Preserve (Retain) Data Annotations when update model using Entity Framework Code First in ASP.Net

abhi619
 
on Aug 27, 2019 06:42 AM
2249 Views

I am using database first approach and added Data annotaion validation in model classes but whenever I update model it overwrites all Model classes and remove all data annotation validation. How to handle this?

Download FREE API for Word, Excel and PDF in ASP.Net: Download