public Order Remove(int id)
        {
            Order order = dbContext.Find <Order>(id);

            dbContext.Orders.Remove(order);
            dbContext.SaveChanges();
            return(order);
        }
Пример #2
0
        public OrderItem Remove(int id)
        {
            OrderItem orderItem = dbContext.Find <OrderItem>(id);

            dbContext.OrderItems.Remove(orderItem);
            dbContext.SaveChanges();
            return(orderItem);
        }
        public Product Remove(int id)
        {
            Product product = dbContext.Find <Product>(id);

            dbContext.Products.Remove(product);
            dbContext.SaveChanges();
            return(product);
        }