Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我注意到这Code First使得每个字符串都nvarchar成为SQL database. 并且最大字符数设置在MAX.
Code First
nvarchar
SQL database
MAX
我如何影响这种行为?
尝试这个:
[MaxLength(10)] public string PropertyName {get;set;}