Click here to Skip to main content
13,504,308 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


5 bookmarked
Posted 23 Aug 2010

Entity Framework 4 twist in Complex Type and stored procedure

Rate this:
Please Sign up or sign in to vote.
Entity Framework 4 twist in Complex Type

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!.



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


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.

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.180417.1 | Last Updated 23 Aug 2010
Article Copyright 2010 by Vinayaka Krishna Shenoy
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid