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

后端 未结 6 1151
失恋的感觉
失恋的感觉 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:54

    Have a look here:

    https://github.com/DarioN1/SPToCore

    This is a scaffolder for stored procedure, it can help you to work with sp.

    Its not a third part library, it generated pure c# code to include in your project that extends current dbContext to provide stored procedure methods, parameters mapping and results classed.

提交回复
热议问题