EF Core scaffold dbcontext不生成StringLength属性

时间:2017-06-02 09:08:45

标签: entity-framework-core

我正在使用Scaffold-DBContext commnand来从我的数据库创建模型。 我使用选项-DataAnnotations来生成DataAnnotation属性。 我得到了Required和ColumnAttribute,例如:

[Required]
[Column(TypeName = "varchar(100)")]
public string Cognome { get; set; }

但我没有StringLength属性。 有没有办法生成这个属性? 谢谢。

0 个答案:

没有答案
相关问题