Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EF in real life, I want to believe (Does anyone have good pointers to non-trivial EF 1.0(3.5) or 4.0 examples?)

I have recently found myself becoming more negative about EF and cannot help wondering if the real problem is my own knowledge on the subject. I have seen many simple/artificial examples of using EF, especially in conjunction with MVC, but I have not yet found any real-life examples of using EF and taking advantage of all the functionality. In addition, every attempt that I have made so far to use EF seems to have been scuppered either by deficits in the VS2008 designer (such as support for server generated fields/columns) or by the need to provide reams of additional code to support updating the data back to the source (where I expected this to be supported by EF).

In order for me to really look into this and make a more educated decision, can anybody point me to some examples of using EF, with ASP.NET for instance, in a real-life situation - such as retrieving some related data from the underlying source, updating that data and then persisting those changes to the source. In any example you can provide, I would like to be able to see only the changes made by the user being sent back to the source rather than simply overwriting the current version.

I would also like to see some examples of being able to use EF in a web service/WCF situation where again an entity is retrieved with related objects and any changes made are persisted back to the data store.

I would prefer as many examples as possible to be using EF 1.0 (3.5) as this is the version that is currently available for production use, but I would also be interested to any EF 4.0 examples that prove things are going to get better.

I want to believe that EF is the way forward. I particularly like the idea of treating a database as if it were simply a bunch of related objects (and have frequently rolled my own versions of this in the past) but it seems that EF only goes so far. I have a couple of new projects on the horizon involving fairly large databases and cannot currently justify the use of EF even though I would really like to.

like image 331
Martin Robins Avatar asked Jun 22 '09 18:06

Martin Robins


2 Answers

See http://dataguidance.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=28998 for the official EF v4 Reference Implementation (features ASP.NET MVC front end).

like image 78
Andrew Peters Avatar answered Oct 29 '22 00:10

Andrew Peters


I think it will be awhile before EF catches up to Hibernate.

like image 21
Spencer Ruport Avatar answered Oct 28 '22 23:10

Spencer Ruport