Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think this is a timely question, as I was wondering the exact same thing. I am trying to create a serious e-commerce model and I am trying to keep my POCOs free of persistence concerns as well as trying to stay true to Domain Driven Design. So far, I am very wary, and I am on the fence about whether I should jump ship to NHibernate. The only thing keeping me from doing so is that I assume that Microsoft will improve (and quickly).</p> <p>Some of the biggest problems so far:</p> <ul> <li>Inability to finely control object materialization. EF calls the zero-arg constructor on your POCO, and this is a behavior you cannot change.</li> <li>No enum support. The community has been screaming -- screaming! -- for this, and it hasn't happened. The workarounds are terrible, and pollute your domain model.</li> <li>Weird mapping bugs when trying to control column names and relationships in the database. The main ones I can think of are with compound keys and many-to-many relationships. These can be worked around, and I assume these will be fixed by release time, but they are frustrating nonetheless.</li> <li>Bad SQL. I also do DBA work, and the SQL that EF generates (with or without Code-First) is atrocious.</li> </ul> <p>And this is just the tip of the iceberg: I am only starting to learn EF4 and I'm running into awful roadblocks. As I think of more reasons, I'll add them here. I'm still struggling through it.</p> <p>(I wonder whether the community will give it another vote of "no confidence.")</p> <hr> <p>More:</p> <ul> <li>To add to the "Weird mapping bugs" problem: You cannot control the name of a column if it participates in a self-referencing relationship (for example, if you have a hierarchy). I assume this will be fixed in the final release.</li> <li>Lack of batching, resulting in multiple roundtrips to the database. For example, how do you delete a bunch of items from a collection? <i>Load all entities into memory and delete them one at a time.</i> A smaller gripe is the number of DB hits when inserting into tables that participate in an inheritance relationship.</li> <li>No intelligent way to deal with model changes. EF Code-First loves to completely drop your entire database if it needs to change the schema.</li> <li>Few extensibility points. You can literally count on one hand the number of events that EF4 allows you to subscribe to (and Code-First doesn't provide much more).</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload