Stored procedures in entity framework

后端 未结 3 1676
没有蜡笔的小新
没有蜡笔的小新 2021-02-09 17:31

I am trying to use a stored procedure in the entity framework that returns nothing. The stored procedure is purely for logging.

I added a function (right click -> add -

3条回答
  •  忘掉有多难
    2021-02-09 17:57

    From EF 4.1, it is possible . Till Ef 4.0 , it is not possible. You can use the following lines for calling sp in ef 4.1

    res = ctx.Database.SqlQuery(...your SP call...);
    

    For more clarification , please refer Handle Stored Procedure in Entity Framework

提交回复
热议问题