Entity Framework Feature Suggestions

Table-Valued Parameters

TVP support for stored procedures

750 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Mike FlaskoAdminMike Flasko (Lead Program Manager, DataFx) shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    Chairman ArunachalamChairman Arunachalam shared a merged idea: custom table types support for SQL 2008 to perform Bulk save operations  ·   · 

    15 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Daniel KressDaniel Kress commented  ·   ·  Flag as inappropriate

        This would be nice and useful if supported in L2E queries. We got some places where we process potentially big lists in multiple steps and in the end do some result select for the collected Guids.

        Guid[] bigIDList = ...; // Usually around 50 but sometimes more than 100,000 IDs
        return ctx.Addresses.Where(x => bigIDList.Contains(x.ID)).ToList();

      • Anonymous commented  ·   ·  Flag as inappropriate

        you have my vote as it will deal with batch crud too - as it does with odp.net

      • abel lopezabel lopez commented  ·   ·  Flag as inappropriate

        It would be great if sql server table bear the type within the parameters of a procedure as it would have much use.

        Example I have to do a procedure you need to pass a set of parameters and would be great if encapsulated in a class.

        There are other applications of this functionality but the most important thing is to use the user-defined types anywhere in the code. If you have increased the treatment of the model layer. To do procedures that can be written in C # I think the final touch would be to put the data types abstract classes as parameters of procedures.

        I hope they understand our needs at the time of giving solutions to practical problems and complicated business rules and to make object-oriented programming tool that helps us to really set in stored procedures in SQL Server

      • bhuvinbhuvin commented  ·   ·  Flag as inappropriate

        Various times we require this , not every time could we use xml or other types . Please help us out !!!!!

      • Venkata Rao VenkamsettyVenkata Rao Venkamsetty commented  ·   ·  Flag as inappropriate

        I am surprised to know that Linq to SQL does not support Table Valued Parameters. will this be fixed? or it is decided not to address this?

      • John SaundersJohn Saunders commented  ·   ·  Flag as inappropriate

        Ironically, I just found a need for this yesterday. I have what would have been a simple join (find information on a set of people) except that the set of people comes from a stored procedure from a different database running on a different server. I'm already using LINQ to Objects to join these two sets of data, so if I could pass the first set as a parameter to the SP that produces the second set, that would be great.

      • Catalin AdlerCatalin Adler commented  ·   ·  Flag as inappropriate

        This is a very usefull feature. We are all trying to squeeze max perf from sql, so we dont loop and call sql code, we accumultate the arguments intro xml/table type and call sql only once.

        This would be a very usefull feature.

      Feedback and Knowledge Base