none
problem in use sp in EF

    Question

  • 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

    Thursday, November 01, 2012 1:53 PM

All replies

  • 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:07 PM
  • Thursday, November 01, 2012 2:11 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:26 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:30 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:48 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

    Thursday, November 01, 2012 2:50 PM
  • thanks for your tracking

    i try it and it's coorect

    note in this sp i use a tabe template below like :

    CREATE TABLE #TmpRelease ( PortID int, PortName nvarchar(30), BLType nvarchar(50), BLQty Numeric, F20Qty Numeric, F40Qty Numeric )

    SELECT * FROM #TmpRelease

    do possible it be problem


    Thursday, November 01, 2012 3:11 PM
  • 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

    Friday, November 02, 2012 8:28 AM