How to call a stored procedure in EF Core 3.0 via FromSqlRaw

后端 未结 6 1136
失恋的感觉
失恋的感觉 2020-12-03 14:04

I recently migrated from EF Core 2.2 to EF Core 3.0.

Unfortunately, I haven\'t found a way to call a stored procedure that returns an entity.

In EF Core 2.

6条回答
  •  北海茫月
    2020-12-03 14:46

    I am not where I can test but I think the following will work:

    var createdPath = ModelContext.Paths.FromSqlRaw("AddNodeWithPathProc {0}, {1}", parm1 parm2).Single();
    

提交回复
热议问题