Exemple #1
0
        public async Task <int> RemoveOrder(int id)
        {
            var order = GetOrder(id);

            order.OrderStatus = "Cancelled";
            deckelShopContext.Orders.Update(order);
            return(await deckelShopContext.SaveChangesAsync());
        }
        public async Task <int> EditCustomer(Customer customer)
        {
            deckelShopContext.Update(customer);

            return(await deckelShopContext.SaveChangesAsync());
        }
Exemple #3
0
 public async Task <int> EditProduct(Product product)
 {
     deckelShopContext.Update(product);
     return(await deckelShopContext.SaveChangesAsync());
 }