Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the most annoying feature (or lack of feature) you have found in the Entity Framework?

I am starting with the Entity Framework. It sounds great. But I am wondering if I should watch out for some weakness somewhere. Any experience there?

like image 575
tom greene Avatar asked Dec 18 '09 22:12

tom greene


1 Answers

You probably need to start prefixing these questions with the version you are talking about. A good amount of the annoyances have been fixed in the upcoming version in .NET 4.0.

Here is what I would say after working with the first version for about 6 months using a decent size DB in sql 2k8(40+ tables, several tables with close to 1M rows, and decent amount of traffic)

  • Lack of Foreign key properties. Meaning if I want to know or work with just the id of a related table I have to load the actual entity. (fixed in next version)
  • Utter lack of an easy outer join like linq to sql has when using DefaultIfEmpty. Fixed in next version.
  • Generated Sql is less than optimal This seems to be fixed in next version as well
  • Very difficult to abstract from your code for testability and for use in multi tiered environments, but it can be done. This can also be classified as the POCO problem that also has been resolved.

There are more, but these are my top ones.

Overall I would use it again, but if you are starting from scratch please save yourself some pain and wait for the latest version or start using the beta if you can.

like image 63
Greg Roberts Avatar answered Oct 07 '22 14:10

Greg Roberts