P1_TrevorGraham/MvcStoreApplication/BusinessLogic/BusinessLogic.cs
/// <summary>
/// returns viewmodels for inventory lines for the given location guid id
/// </summary>
/// <param name="locationId"></param>
/// <returns></returns>
returns viewmodels for inventory lines for the given location guid id
returns viewmodels for inventory lines for the given location guid id
public LocationWithInventoriesViewModel GetInventoryDetails(Guid locationId)
        {
            Location location = _repository.GetLocationById(locationId);
            if (location == null)
            {
                location = _repository.GetDefautLocation();
            }
            List<InventoryViewModel> inventory = GetInventoryModelsForLocation(locationId);
            LocationWithInventoriesViewModel locationInventory = new LocationWithInventoriesViewModel()
            {
                LocationId = location.LocationId,
                Name = location.Name,
                InventoryItems = inventory
            };
            return locationInventory;
        }
public LocationWithInventoriesViewModel GetInventoryDetails ( Guid locationId ) { Location location = _repository . GetLocationById ( locationId ) ; if ( location == null ) { location = _repository . GetDefautLocation ( ) ; } List < InventoryViewModel > inventory = GetInventoryModelsForLocation ( locationId ) ; LocationWithInventoriesViewModel locationInventory = new LocationWithInventoriesViewModel ( ) { LocationId = location . LocationId , Name = location . Name , InventoryItems = inventory } ; return locationInventory ; }
returns viewmodels for inventory lines for the given location guid id
returns viewmodels for inventory lines for the given location guid id
None
locationId
Guid
None