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?
Hi abhi619,
Refer below links.
https://stackoverflow.com/questions/17744625/loosing-dataanottation-when-upload-model-from-database
https://forums.asp.net/t/1746967.aspx?How+to+Preserve+Data+Annotations+When+Doing+Update+from+Database
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.