Capture Stored Procedure print output in .NET (Different model!)

后端 未结 4 1016
余生分开走
余生分开走 2021-01-04 21:06

Basically, this question with a difference...

Is it possible to capture print output from a TSQL stored procedure in .NET, using the Entity Framework?

The so

4条回答
  •  南笙
    南笙 (楼主)
    2021-01-04 21:39

    Actually, it does, but since the EF is not SQL Server specific, you have to cast it:

    var sqlConn = (SqlConnection)Context.Connection.StoreConnection;
    

提交回复
热议问题