DataAnnotation Atributes not applied in EF7

自闭症网瘾萝莉.ら 提交于 2019-12-25 01:08:31

问题


When i migrate a database using k ef migration add bla bla. command the data annotation attributes are not reflected to the created database

e.g. iam using the [MaxLength(2)] attribute and am getting a column with data type nvarchar(MAX) created

Any help please


回答1:


Data Annotations are not yet implemented in EF7. See issue #107.



来源:https://stackoverflow.com/questions/27924491/dataannotation-atributes-not-applied-in-ef7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!