How to call Stored Procedure in Entity Framework 6 (Code-First)?

前端 未结 21 2519
滥情空心
滥情空心 2020-11-22 05:04

I am very new to Entity Framework 6 and I want to implement stored procedures in my project. I have a stored procedure as follows:

ALTER PROCEDURE [dbo].[ins         


        
21条回答
  •  情书的邮戳
    2020-11-22 05:56

    When EDMX create this time if you select stored procedured in table select option then just call store procedured using procedured name...

    var num1 = 1; 
    var num2 = 2; 
    
    var result = context.proc_name(num1,num2).tolist();// list or single you get here.. using same thing you can call insert,update or delete procedured.
    

提交回复
热议问题