P1_TrevorGraham/MvcStoreApplication/BusinessLogic/BusinessLogic.cs
/// <summary>
/// returns an order viewmodel based on a given inventory viewmodel that it is being created from
/// </summary>
/// <param name="inventoryViewModel"></param>
/// <returns></returns>
returns an order viewmodel based on a given inventory viewmodel that it is being created from
returns an order viewmodel based on a given inventory viewmodel that it is being created from
public OrderLineViewModel CreateOrderLine(InventoryViewModel inventoryViewModel)
        {
            OrderLineViewModel viewModel = new OrderLineViewModel()
            {
                InventoryId = inventoryViewModel.InventoryId,
                Price = inventoryViewModel.Price,
                ProductName = inventoryViewModel.ProductName,
                Quantity = 0,
                StoreName = inventoryViewModel.LocationName,
                TotalPrice = 0,
            };
            return viewModel;
        }
public OrderLineViewModel CreateOrderLine ( InventoryViewModel inventoryViewModel ) { OrderLineViewModel viewModel = new OrderLineViewModel ( ) { InventoryId = inventoryViewModel . InventoryId , Price = inventoryViewModel . Price , ProductName = inventoryViewModel . ProductName , Quantity = 0 , StoreName = inventoryViewModel . LocationName , TotalPrice = 0 , } ; return viewModel ; }
returns an order viewmodel based on a given inventory viewmodel that it is being created from
returns an order viewmodel based on a given inventory viewmodel that it is being created from
None
inventoryViewModel
InventoryViewModel
None