-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HasMaxLength(4000) set to NVARCHAR(MAX) #8685
Comments
Note that the Migration's Up() method correctly generate the following codes: |
Can you explain what do you mean by this?
|
What I meant is that the datatype is NVARCHAR(MAX) instead of NVARCHAR(4000). |
Can you also post output of |
That's a good idea, let me take a look. |
https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql
|
"Variable-length Unicode string data. n defines the string length and can be a value from 1 through 4,000" |
Off by one. |
This no longer repros on dev. Somebody must have inadvertently fixed it. 😉 |
ae2277e |
Steps to reproduce
I have the following API:
builder.Entity() .Property(p => p.Message).IsRequired().HasMaxLength(4000);
However, SQL Server uses NVARCHAR(MAX) instead of NVARCHAR(4000).
Further technical details
EF Core version: 1.1.2
Database Provider: Microsoft.EntityFrameworkCore.SqlServer 1.1.2
Operating system: Windows 7
IDE: Visual Studio Community 2017
The text was updated successfully, but these errors were encountered: