34

So the ADO.NET Entity Framework has gotten a little bit of bad press (in the form of blog entries and a petition) but I don't want to rush to judgement. I'm limited in time for experimentation but I was wondering has anyone worked with it yet with more empirical feedback?

Finally, what are thoughts on using NHibernate which has been around for a long time and may be more mature than the ADO.NET Entity Framework.

Răzvan Flavius Panda
  • 21,730
  • 17
  • 111
  • 169
t3rse
  • 10,024
  • 11
  • 57
  • 84

7 Answers7

13

NHibernate may be more mature. That does not necessarily mean it is a "better" solution. Having used it at my job for some time, I would personally prefer to use almost anything than NHibernate (even straight SQL, if migration were remotely feasible). The number of error messages thrown by NHibernate that don't mean anything (or that do mean something but should never occur) is absolutely staggering, as are some of its default behaviours (such as flushing the session once for each object returned in a Find).

Personally, when I have a choice, I use LINQ to SQL for all database work.

TheSmurf
  • 15,337
  • 3
  • 40
  • 48
  • does the subsiding support recently spouted about in the 'sphere make you question this decision? i feel as though i needed to abandon it for fear that future needs for support would be ignored by ms. thoughts? – brady gaster Dec 10 '08 at 03:12
  • I'm not terribly concerned. If it's abandoned completely (unlikely), it's always possible for a third party to build a LINQ to SQL layer ontop of plain LINQ (which is not going anywhere), similar to the groups that did LINQ to AD or LINQ to NHibernate. Someone would almost certainly do this. – TheSmurf Dec 10 '08 at 18:48
  • 4
    My favourite one is "expected affected row count: 1, actual affected row count: 0," without an explanation or even a table name. There are lots more, but that one's fairly demonstrative. – TheSmurf Feb 04 '09 at 19:41
  • 1
    @Brady Gaster LINQ nor EF are going anywhere. MS is pushing EF big time and have really listened to the community. I agree that they still have a lot of things to improve but I have no doubt that they will. – CatDadCode Nov 07 '10 at 07:56
12

If zero configuration is main advantage of SubSonic you can look at Fluent nHibernate or Entity Framework Code-First

UPDATE from Răzvan Panda: Fluent NHibernate has been mostly made obsolete by inclusion in NHibernate itself of mapping by code, see: notherdev.blogspot.ie/2012/02/

Regfor
  • 8,515
  • 1
  • 38
  • 51
6

It has been 2 years since the original post. From what I understand ADO.NET Entity Framework has matured in with .net 4. Does anyone have any new feedback on this topic?

Here's a link to the improvements added to EF since first release in 2008 http://blogs.msdn.com/b/adonet/archive/2009/05/11/update-on-the-entity-framework-in-net-4-and-visual-studio-2010.aspx

Update: I found this thread on stack overflow that does a nice job of discussing the updated EF:

Entity Framework 4 vs NHibernate

Community
  • 1
  • 1
Alex
  • 9,250
  • 11
  • 70
  • 81
4

Microsoft have all but admitted that the ADO.Net Entity Framework isn't an ORM (I can't find a reference currently). So if you think of the Entity Framework as a query engine then apparently it is really good at what it does. For a complete ORM solution you might want to look elsewhere however.

The following blog post seems to bear out this difference:

http://blogs.msdn.com/dsimmons/archive/2008/05/17/why-use-the-entity-framework.aspx

samjudson
  • 56,243
  • 7
  • 59
  • 69
3

I've used SubSonic, LinqToSql, LinqToEntities. Now i'm trying NHibernate. For now - i like NHibernate (probably cause i haven`t met problems enough). Worst of them all - LinqToEntities (that's only my opinion, of course).

Arnis Lapsa
  • 45,880
  • 29
  • 115
  • 195
0

I am coming around to liking Entity. It takes a while to figure out what all of its error messages mean but once you get used to it it really does a great job. The biggest drawback it has right now is no real support for going disconnected.

MvcCmsJon
  • 609
  • 7
  • 12
0

I do have a problem with SubSonic. SubSonic choked to death on tables with same name but different schema. I don't want to discuss the best practices of building a database, because I did not make the call to do so.( When it comes to raise voice make a point and keep the job, I'd rather keep my job. :) )

  • That's a good insight - where I work someone designed a database in the same way with duplicated names across multiple schemas. – t3rse May 04 '09 at 22:27