Entity Framework Database First approach with Asp.net MVC -


i using entity framework 4.4 database first approach asp.net mvc 4, had master tables country, city, want insert data it, validation need define separate model each table. using t4 template method generate separate class each table.

my simple question how can put validation in db class generate t4 template method, not need create separate model each of master tables.

you don't need change classes generated ef classes regenerated ef , change made lost. think approach right - apply validation on model classes have created (using data annotations)


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -