views:

435

answers:

1

I tried to follow this link to map stored procedures to Custom Entities, but when I did so I could no open the EDMX file in the VS 2008 designer. so looks like it is causing some issues.

Does anyone know how to map Stored procedure results to custom Entities in Entity Framework?

A: 

In VS2010 and EF4 this is extremely easy todo. When you do a function import it there is an extra option for returning the collection as a complex type. Even better there is a feature @ the bottom of the 'Add Function Import' dialog that will attempt get the columns from the stored proc result set. Finally, it gives you the option todo a one-click 'Create New Complex' type based upon the result sets. It appears the EF team saw this as a pain and took all necessary steps to make this easier.

We have a large project that we are about to start on (large meaning 30+ developers and taking 2+ years to complete). We were weighing the options of using standard ADO.Net, EntityFramwork, or a 3rd party ORM like LLBLGen. What we are seeing so far is that the Entity Framework 4 release is a much more full featured ORM. I would be very skeptical @ using EF in VS2008 mostly because of the issue you are talking about in this post + how EF handled the FK's in the VS2008 release (http://blogs.msdn.com/efdesign/archive/2009/03/16/foreign-keys-in-the-entity-framework.aspx)

Kevin Castle