ASP.NET MVC3 - Data Annotations with EF Database First (ObjectContext, DbContext)

て烟熏妆下的殇ゞ 提交于 2019-12-18 04:52:19

问题


How can we use Data Annotations for models if the models are generated with 4.1 ADO.NET DbContext Generator or something else?


回答1:


You can use a partial metadata class



来源:https://stackoverflow.com/questions/5956081/asp-net-mvc3-data-annotations-with-ef-database-first-objectcontext-dbcontext

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