P1_TrevorGraham/MvcStoreApplication/BusinessLogic/BusinessLogic.cs
/// <summary>
/// attempts to add a product to the inventory, and returns whether or not it was successful
/// </summary>
/// <param name="viewModel"></param>
/// <returns></returns>
attempts to add a product to the inventory, and returns whether or not it was successful
attempts to add a product to the inventory and returns whether or not it was successful
public bool AddProductToInventory(InventoryViewModel viewModel)
        {
            return _repository.AttemptAddProductToStore(
                _repository.GetProductById(viewModel.ProductId),
                _repository.GetLocationById(viewModel.LocationId),
                viewModel.Quantity);
        }
public bool AddProductToInventory ( InventoryViewModel viewModel ) { return _repository . AttemptAddProductToStore ( _repository . GetProductById ( viewModel . ProductId ) , _repository . GetLocationById ( viewModel . LocationId ) , viewModel . Quantity ) ; }
attempts to add a product to the inventory, and returns whether or not it was successful
attempts to add a product to the inventory and returns whether or not it was successful
None
viewModel
InventoryViewModel
None