Entity Framework 4.1 Code First

added by Velcrow
9/30/2011 8:25:29 AM

244 Views

This post focus on Entity Framework 4.1 Code First technology which allows developers to code their domain first and from that code generate database without writing any line of SQL code. Such approach is encourage by very popular Domain Driven Development methodologies.


2 comments

dpeterson
9/30/2011 8:29:12 AM
I just recently used EF Code First on a project, and I don't think I'll be using it again. I had to go through a number of hoops to get it to create the proper schema, even sometimes being forced to created relationships in code that don't *really* exist. This was the case when I had some sort of lookup table, sometimes it would duplicate records in the lookup table every time I referenced it from an FK relationship. Sometimes it would generate the schema incorrectly, mixing the classes together into one table which pretty much defeated the purpose of not making the schema by hand.
At this point, for extremely simple data models with very simple relationships it's a good timesaver. Other than that, I would think very hard about using it full time. Especially with the lack of proper migration support.

vijayst
9/30/2011 9:10:49 PM
Thanks for the post. A very good intro abt EFCF.