public void DeleteCustomer1(int cid) { var rep = new EfCustomerService(context); var customer = rep.GetById(cid); if (customer != null) { if (rep.GetAll().Contains(customer)) { rep.Delete(customer); } } }
public Customer GetCustomer(int id) { var rep = new EfCustomerService(context); return(rep.GetById(id)); }