Click here to Skip to main content
Click here to Skip to main content

Tagged as

Go to top

Entity Framework 4 twist in Complex Type and stored procedure

, 23 Aug 2010
Rate this:
Please Sign up or sign in to vote.
Entity Framework 4 twist in Complex Type
Hi,
 
I was exploring a bit on new features of EF4. especially from the aspect of Complex types and storedprocedure.
 
A case where you need to be very careful is as follows:
 
A storedprocedure returns the result set which exactly matches Entity Object of EDM(Entity Data Model).From the wizard if you choose the return type as Entity and map to the respective Entity Object from the drop down of the wizard everything works fine, but the twist is that - if in the EDM if you create a complex type on the Entity Object, and then if you map this(Entity Object with Complex type property) to the return type of stored procedure - You will get the Invalid Operation Exception.
 
Hence the suggestion is that - you create the new complex type to work around
 
I hope this will be fixed with the next patch /release...
 

I hope this heps!.
 
Regards,
-Vinayak

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Vinayaka Krishna Shenoy
Architect MindTree Ltd
India India
Motivated achiever who guides organizations in applying technology to business settings, provides added value, and creates project deliverables in a timely manner. An experienced Technical Consultant, have successfully led large project teams of more than 20 people from requirements gathering to implementation and support using C#, .NET ,ADO.NET, ADO.NET Entity Framework,ASP.NET,ASP.NET MVC, WCF and SQL Server.

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 23 Aug 2010
Article Copyright 2010 by Vinayaka Krishna Shenoy
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid