コード例 #1
0
 public int Create(Customer customer)
 {
     context.Customer.Add(customer);
     context.Entry(customer).Reload();
     context.SaveChanges();
     return(customer.CustomerId);
 }
コード例 #2
0
        public void UpdateInventory(int InventoryID, int quantity)
        {
            var update = context.Inventory.Find(InventoryID);

            update.InventoryCount -= quantity;
            context.SaveChanges();
        }
コード例 #3
0
 public void RemoveOrderItem(OrderLine item)
 {
     context.OrderLine.Remove(item);
     context.SaveChanges();
 }