I am implementing Asp.Net core Web API , entity framework core, database first approach using Visual Studio 2017. I have managed to generate the context and class files base
The workaround we use in EF Core to execute stored procedures to get the data is by using FromSql method and you can execute stored procedure this way:
List employees = dbcontext.Employee
.FromSql("GetAllEmployees").ToList();
But for Create, Update, and Delete, we use ExecuteSqlCommand like the one below:
var employee = "Harold Javier";
dbcontext.Employee
.ExecuteSqlCommand("InsertEmployee @emp", employee);