Monday, 13 February 2012

Mapping Complex Type Stored Procedure in Entity Framework 3.5

Please flow the below steps to map a complex type stored procedure in entity framework 3.5 :
  1. Write the stored procedure.
  2. Create a View with same set result. Both name of the column and the data type should match.
  3. Import the View.
  4. Create a function import for the stored procedure.
  5. Choose the return type as Complex and map to the view.
Now the result returned can be type casted to the view's entity.
Still there is one more limitation in Entity Framework 3.5, that the multiple result set can't be mapped. This can be achieved using Entity Framework Extnesion in EF 3.5.

Both the issues are resolved in EF 4.1.

1 comment: