public int Delete(int id) { var existing = _bheDBContext.Repairs.Find(id); if (existing != null) { _bheDBContext.Entry(existing).State = System.Data.Entity.EntityState.Deleted; } return(id); }
public int Delete(int id) { var existing = _bheDBContext.Customers.Find(id); if (existing != null) { if (existing.Invoices.Count > 0) { } _bheDBContext.Entry(existing).State = System.Data.Entity.EntityState.Deleted; } return(id); }