views:

251

answers:

1

I was listening to a podcast recently that was discussing at length the short comings of Entity Framework (EF).

But, their opinions may need to be taken with a grain of salt (by me), as from what I could gather:

  • These were folks that were ORM experts.
  • They either made their living off of ORM tools, or their hobby
  • They were using ORM tools for large scale applications
  • They were also very concerned with the uber-tactics of ALT.NET that I'm not necessarily concerned with (YET)

My overall question is:

  • For what type of project is Entity Framework currently suited?

But here are a few sub-questions that may help you get where I'm headed with that question:

  1. Is EF better than nothing? I'm tired of doing everything by hand.
  2. Does it come close to "solving the same problem" as LINQ to SQL? 2a. If yes, when would one be suited over the other? * found a thread on this question as I was going over questions with this tag, so nevermind *
  3. Does it lend itself to simple 'quick and dirty' applications, such as when the bulk of your administrative CRUD forms?

edit: for those that might be curious, I am mostly working on small to medium sized applications. That can guide your response, or not.

+1  A: 

The Entity Framework is suitable for all applications which would benefit from having an ORM layer. Daniel Simmons post goes into detail on this. http://blogs.msdn.com/dsimmons/archive/2008/05/17/why-use-the-entity-framework.aspx

Entity Framework is similar in many ways to Linq for SQL but is not tied to MS SQL Server which Linq for SQL is. In addition EF supports more flexible mapping between your business/domain objects and the data tables. Linq for SQL supports more of a one to one mapping whereas EF supports ability to map a single object to multiple tables, or a single table to multiple objects. You do have decent designer support in both.

In the open source world, NHibernate is probably the most advanced and in many ways is the more mature product (it certainly supports a wider array of features to some regard). But with EF you get the full support of MS and the close integration into the visual studio toolset and .net framework stack. EF also as a better Linq profider than NH at the time of writing.

For a quick and dirty application i would lean towards Linq for SQL to be honest, if you can live with MS SQL Server and the mapping restrictions.

For a more complex application i would use EF or NHibernate.

You might be interested in a vote of confidence post i gave on the EF http://blog.keithpatton.com/2008/06/24/A+Vote+Of+Confidence+For+The+Entity+Framework.aspx

Keith Patton