/// <summary> /// Update's the inventory record of the amount of a Location's specific product /// </summary> /// <param name="location">The Location who's inentory will be updated</param> /// <param name="product">The product that will be added/removed from the location</param> /// <param name="quantity">The new quantity of the prouct that the current location will carry.</param> /// <returns></returns> public ProductInventory UpdateInventory(Location location, Product product, int quantity) { ProductInventory productInventory; using (var ctx = new VendorContext()) { ProductInventorieService pIS = new ProductInventorieService(ctx); productInventory = pIS.UpdateInventory(location, product, quantity); } return(productInventory); }