Pulse7
8/16/2017 - 1:29 PM

Removing object (by id) with stored procedure to avoid one round trip to database( so instead of 2 there will be one)

Removing object (by id) with stored procedure to avoid one round trip to database( so instead of 2 there will be one)

var keyval = 3;
using (var context = new NinjaContext()){
  context.Database.ExecuteSqlCommand("exec DeleteNinjaViaId {0}",keyval);
}