Last post Mar 24, 2015 05:26 PM by Annous
Mar 23, 2015 08:42 PM|Annous|LINK
Fluent API's IsMaxLength() or DataAnnotations' [MaxLength] both end up creating an nvarchar(4000) column in the SQL Server column.
I need to create an nvarchar(MAX) using code first. Is it possible at all?
Thanks for your help.
Mar 24, 2015 03:50 AM|Mikesdotnetting|LINK
You should be able to generate an nvarchar(max) column by just setting your property as a string. Don't apply any annotations to it.
Mar 24, 2015 05:26 PM|Annous|LINK
Thanks Mike. I thought I had tried it but it seems that I hadn't. Works very well.