public void Remove(T entity) { using (var ctx = new BHMSContext()) { ctx.Entry(entity).State = EntityState.Deleted; ctx.SaveChanges(); } }
public void Save(T model) { using (var ctx = new BHMSContext()) { ctx.Entry(model).State = EntityState.Modified; ctx.SaveChanges(); } }