【发布时间】:2018-02-10 01:30:01
【问题描述】:
我正在使用使用实体框架的 Core 2.0。 我已经使用脚手架 DBContext 成功生成了上下文。 我有表 EMployee 的 DBSet。 我需要执行 SToredProcedure,它会给出员工名单。 我看不到 .FromSql 和 .ExecuteCommand 选项。
我添加了 EntityFrameworkCore.SqlServer(2.0.1)、EntityFrameworkCore.SqlServer.Design(1.1.5)、Microsoft.VisualStudio.Web.CodeGeneration.Design(2.0.2) 和 EntityFrameworkCore.Tools(2.0.1) 但是没办法。
请指导提到的问题。
【问题讨论】:
-
到目前为止您尝试过什么?你也搜索过什么?我在 Google 中搜索了“ef core call stored procedure”,得到了很多很多的结果(其中大部分是这里的问题,有公认的答案)
-
我无法获得 FromSql 方法的智能感知
标签: .net-core entity-framework-core