Hi, I would like to know the pros and cons of using EF4 Code-First approach. Can we duplicate all features that EF4 generated classes offer like Lazy Loading, loading related entities, etc?
Thanks
Hi, I would like to know the pros and cons of using EF4 Code-First approach. Can we duplicate all features that EF4 generated classes offer like Lazy Loading, loading related entities, etc?
Thanks
Cons:
Pros
Most other things are exactly the same (lazy loading, explicit loading, etc.). A few more are matters of personal preference (the API).
Pros
Cons
For sample code and mapping to existing databases using EF 4.0 Code First see this blog post. http://theminimalistdeveloper.com/2010/07/28/how-to-map-pocos-to-existing-databases-in-entity-framework-4-0-code-first-and-asp-net-mvc-2/