Jan 23, 2013 at 8:23 PM

What combination of Field attribute options do I need to use to create a nText field in the database?

Jan 23, 2013 at 8:33 PM
Edited Jan 23, 2013 at 8:33 PM

Crap.  Figured it out.  I'm not sure at what point the length forces it to nText versus nvarchar but this worked.


[Field(DataType=System.Data.DbType.String, Length=8000)]
Jan 24, 2013 at 2:16 PM
Edited Jan 24, 2013 at 2:17 PM

The default length is if the string size is greater than 4000, it becomes ntext.  See SQLStoreBase.cs `GetFieldDataTypeString()` at around line 390.  The default is set at line 26 of the same file.