-
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
SqlServer: Char mapping worked in 1.1 but does not work in 2.0 #9447
Comments
@jbt00000 Which database provider are you using? |
I'm going against Sql Azure |
In the short term, I've converted my tt file to change the mapping to string. which is not great as there is no not null support, but acceptable in the short term. |
I have the same truble when start Scaffold-DbContext command after updating to core 2.0. But I get the next exception "ArgumentException: Data type 'nvarchar' is not supported in this form. Either specify the length explicitly in the type name, for example as 'nvarchar(16)', or remove the data type and use APIs such as HasMaxLength to allow EF choose the data type." For example part of generated code DB SQL Server 2016 Express. All had worked fine before I started Scaffold-DbContext command after updating to Core 2.0 and VS to 15.3 version. Please help me( ArgumentException: Data type 'nvarchar' is not supported in this form. Either specify the length explicitly in the type name, for example as 'nvarchar(16)', or remove the data type and use APIs such as HasMaxLength to allow EF choose the data type. |
@jbt00000 - It is breaking change see #8656 @ChristopherRobinSuperStar - Please file a new issue since it is unrelated to issue reported here. |
That's fine, the change was fairly minor in my custom tt file. That said, if there is not a "Look at the breaking changes between EF 1.1 and EF 2.0" page, there should be one and this should make the list. |
But what should I do with my breaked varchar mapping? |
@jbt00000 Curious: in 1.1, was the |
it was a char(1) not null And... the best I can say is that nobody had reported a bug on that value... I have a custom TT file that had changed that type into a char, as such, the change on my side was pretty trivial once I understood this to be a permanent change. |
Re-opening this to investigate if this should be added back--we had previously thought the the 1.1 mapping we had was broken, but if it is not, then we should add it back. |
There is no suitable mapping for Saving data is fine for either mapping of Furthermore, with In either case, reading data is char property is not possible so we should disallow mapping |
Removing regression since, saving data always worked but querying data was faulty. Reading back data does not work in 1.1.2 or 2.0.0 so it is not regression. @ajcvickers - Should we close this now? (what should be labels?) |
This is not good man. |
After upgrading from EF 1.1 to 2.0, EF has problem validating model. This is data first and uses attributes.
Definition was...
The text was updated successfully, but these errors were encountered: