ASP.NET MVC3 - Data Annotations with EF Database First (ObjectContext, DbContext)
问题 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