You must Sign In to post a response.
  • Category: LINQ

    Will Linq using stored procedure really affect time complexity in dot net application ?

    While generating the .edmx I found the stored procedure in my database also reflected as the methods in context menu. How if i directly code against the entities for CRUD, use stored procedure ? Will it affect time of execution between direct manipulation with entities vs manipulation with stored procedure for same functionality (CRUD) ?
  • #756244
    Yes. It is found to be the good solution.

    Eg:

    Create stored proc -

    CREATE PROCEDURE [dbo].[TestProc]
    -- Add the parameters for the stored procedure here
    @CustomerID int = null
    AS
    BEGIN

    END



    Execute that in EF -

    using (var ctx = new CustomerEntities())
    {
    //Execute stored procedure as a function
    var customerList = ctx.TestProc(1).ToList<Customers>();

    }

    Thanks & Regards,
    Abhijith

    Mail - abhijith.pn@gmail.com
    Check My Blog - http://www.solvemytechissue.in/


  • Sign In to post your comments