Ejemplo n.º 1
0
        public async Task Delete(int?id)
        {
            Customer customer = await GetAsync(id);

            if (customer != null)
            {
                context.Customer.Remove(customer);
                context.SaveChanges();
            }
        }
        public async Task Delete(int?id)
        {
            Product product = await GetProductAsync(id);

            if (product != null)
            {
                context.Product.Remove(product);
                context.SaveChanges();
            }
        }
        public async Task Delete(int?id)
        {
            OrderDetails orderDetails = await GetAsync(id);

            if (orderDetails != null)
            {
                context.OrderDetails.Remove(orderDetails);
                context.SaveChanges();
            }
        }
Ejemplo n.º 4
0
        public async Task Delete(int?id)
        {
            Order order = await GetAsync(id);

            if (order != null)
            {
                context.Order.Remove(order);
                context.SaveChanges();
            }
        }