Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }