Mapping Stored procedures that return entities

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
HintonBR
Posts: 24
Joined: Mon 16 Jun 2008 17:07

Mapping Stored procedures that return entities

Post by HintonBR » Tue 03 Feb 2009 22:53

How do I map a stored procedure that is has an out ref cursor as the only parameter which simply selects from a table and returns the result as a function import? I am simply trying to figure out how to do something simple like that and there doesn't seem to be any samples or anything directing what needs to happen to make it work. Am I missing the guidance? Also when I add the stored procedure to my model it imports the out parameter as a mode=In even though it is clearly an out parameter - hopefully I don't have to manually modify the SSDL for every SP
________
Strawberry Cough
Last edited by HintonBR on Tue 15 Feb 2011 11:55, edited 1 time in total.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 04 Feb 2009 10:47

Try to create function import using ADO.NET Entity Data Model Designer from the Stored Procedure and map its returning type
to the entity collection already added to the model. Ignore the Mode = "In" record in SSDL part.
When calling the created method simply set the cursor-valued parameter to null.

HintonBR
Posts: 24
Joined: Mon 16 Jun 2008 17:07

Post by HintonBR » Wed 04 Feb 2009 19:34

Thanks Andrey - that worked - this would be good to document (somewhere other than this forum) so that it is more discoverable
________
Elwood engel

Post Reply