Esempio n. 1
0
        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);
                }
            }
        }
Esempio n. 2
0
        public Customer GetCustomer(int id)
        {
            var rep = new EfCustomerService(context);

            return(rep.GetById(id));
        }