I have used both the EF code first and model first apporaches. In my case the model first approach has overall been better for my use. The only thing I miss from code first is that it would auto generate the mappings, and then use those mappings to create a database. Is their any way that I can get model first to do this same thing, namely create the mappings automatically when it instantializes the database.
Asked
Active
Viewed 493 times
1 Answers
1
The EDMX designer should handle this already. When you first generate a database from your model, EF will create the appropriate mappings for you.

Ben Finkel
- 4,753
- 7
- 34
- 49
-
I already know about this, but this isn't what I am talking about. I don't want to generate the databases at design time, only at runtime. Unless these mappings will work in every single provider for EF, these mappings don't actually help. With code first the mappings are generated at run time, and when the DB is created its mappings are specific to the provider. This is the functionality I am looking for in design first, the difference being instead of code, I have provided a model. – Mathflair May 30 '11 at 15:42