problem in use sp in EF
-
Thursday, November 01, 2012 1:53 PM
hi
i in my project use from EF, when i add my sp ,and add Function Import for it
but EF can't create ComplexType for it
please help me
thanks
- Moved by Lisa ZhuMicrosoft Contingent Staff Friday, November 02, 2012 8:28 AM EF related (From:Visual C# Language)
All Replies
-
Thursday, November 01, 2012 2:07 PM
Hi,
You'll have to give us a bit more information on the issue for us to be able to help you.
Here's an article (How to: Define a Model with a Stored Procedure) that might help you.
Kind regards.
Please mark the best replies as answers - Twitter: @rickvdbosch - Blog: http://bloggingabout.net/blogs/rick
-
Thursday, November 01, 2012 2:11 PM
maybe your case is similar to this http://stackoverflow.com/questions/12833531/adding-stored-procedures-complex-types-in-entity-framework
regards
joon
-
Thursday, November 01, 2012 2:26 PM
thanks for your replay
i try it,and some of sp be create complexType but some of them can't return value
what's my problem
-
Thursday, November 01, 2012 2:30 PM
Hi,
again, you will have to give us some more information like the Stored Procedure, the resultset it returns or something like that.
Kind regards.
Please mark the best replies as answers - Twitter: @rickvdbosch - Blog: http://bloggingabout.net/blogs/rick
-
Thursday, November 01, 2012 2:48 PM
thanks for your replay
i visit the sp that can't create be complex type
i run it in sql and the sp time be 2 min, i think entity for this can't create complex type
please help me
thanks
-
Thursday, November 01, 2012 2:50 PM
Hi,
You could change the SP to return less records (for instance by temporary adding a where clause that limits the amount of records returned) and try to use it then?
If that's not it, again, you will have to give us some more information like the Stored Procedure, the resultset it returns or something like that.
Hope this helps
Please mark the best replies as answers - Twitter: @rickvdbosch - Blog: http://bloggingabout.net/blogs/rick
- Edited by Rick van den Bosch Thursday, November 01, 2012 2:52 PM typo
-
Thursday, November 01, 2012 3:11 PM
thanks for your tracking
i try it and it's coorect
note in this sp i use a tabe template below like :
do possible it be problemCREATE TABLE #TmpRelease ( PortID int, PortName nvarchar(30), BLType nvarchar(50), BLQty Numeric, F20Qty Numeric, F40Qty Numeric )
SELECT * FROM #TmpRelease
- Edited by vahidbakhtiary Thursday, November 01, 2012 3:12 PM
-
Friday, November 02, 2012 8:28 AM
Hi vahidbakhtiary,
From your description , I ‘d like to move this post to the most related forum for better support.
You may have more luck getting answers .
Thanks for your understanding .
Regards ,
Lisa Zhu [MSFT]
MSDN Community Support | Feedback to us

