Why do we have to write SET FMTONLY OFF in stored procedures when using Entity Framework

后端 未结 4 971
时光说笑
时光说笑 2021-02-04 10:51

I recently joined one of the project in my team. They use ASP.NET MVC and MS SQL along with Entity Framework as ORM.

I noticed that each of the stored procedures used in

4条回答
  •  北恋
    北恋 (楼主)
    2021-02-04 11:17

    I have done this temporarily in order to be able to use the designer to map functions to represent the stored procedure in code. The problem is that the designer passes null by default to the procedure to determine the schema. This can sometimes be a problem with stored procs that do validation and throw exceptions etc if null is passed. The Setting you describe gets around this since it returns meta and not the actual data.

提交回复
热议问题