且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 Entity Framework Core 中运行存储过程?

更新时间:2021-11-17 00:58:23

现在解决了 EF Core 1.0 中对存储过程的支持,这也支持多个结果集的映射.

Support for stored procedures in EF Core 1.0 is resolved now, this also supports the mapping of multiple result-sets.

查看此处了解修复详情

你可以在c#中这样调用

And you can call it like this in c#

var userType = dbContext.Set().FromSql("dbo.SomeSproc @Id = {0}, @Name = {1}", 45, "Ada");