public override void DeleteRow(object obj) { Model.Locations locations = obj as Model.Locations; using (Model.BaseContext db = new Model.BaseContext()) { db.Locations.Remove(db.Locations.Find(locations.Id)); db.SaveChanges(); } }
public override void ClearRow() { NewRow = new Model.Locations(); }