Пример #1
0
        public Customer Delete(int id)
        {
            var custRemoved = _ctx.Remove(new Customer {
                Id = id
            }).Entity;

            _ctx.SaveChanges();
            return(custRemoved);
        }
Пример #2
0
        public Cart Delete(int id)
        {
            var removed = _ctx.Remove(new Cart {
                Id = id
            }).Entity;

            _ctx.SaveChanges();
            return(removed);
        }