Friday, May 08, 2009

Entity Framework - Pain Continued

Following on from previous post. If you are converting an existing project and database with lots of stored procedures to EF then you have a big job. Support for returning procedures is limited and involves hand editing the EDML file. If you then refresh from your database all you hand codes stuff is deleted. Nor does it support returning scalers.

With Linq To SQL this is a doddle and when you import returning stored procedures it creates the results entities. I appreciate L2S is designed as a simple ORM designed solely for SQL server and the intention of EF is to be used for enterprise applications however I think more work needs to be done on EF. Hopefully the 4.0 version will solve some of the existing problems.

I guess it could be possible to use L2S in a project now and then convert to EF when better support for stored procedures comes in. The same LINQ should work assuming you can recreate the model. Found it http://blogs.msdn.com/adonet/archive/2008/12/02/migrating-from-linq-to-sql-to-the-entity-framework-stored-procedures-for-data-retrieval.aspx

No comments:

Post a Comment