How to prevent from DataAnnotations Attributes being deleted in DataBase First Model
问题 I have my asp.net mvc 3 application with entity framework and i used the Database First model to set it up. My Steps below: 1. Genarated a database with tables 2. Created ADO.NET Entity Data Model file (.edmx) and imported the tables 3. inside the design i added a Code Generation item and used ADO.NET DbContext Generator 4. a Model1.tt holder as been made with all of the tables Models I have edited the models and updated them with DataAnnotations Attributes (just for the example a well known