I noticed that Code First
makes from every string a nvarchar
data type in the SQL database
. And the max amount of characters are set on MAX
.
How can I influence this behavior?
I noticed that Code First
makes from every string a nvarchar
data type in the SQL database
. And the max amount of characters are set on MAX
.
How can I influence this behavior?
Try this:
[MaxLength(10)]
public string PropertyName {get;set;}