public static BusinessLogic.Models.Location MapLocationWithoutOI(Entities.Locations location) { return(new BusinessLogic.Models.Location { ID = location.LocationId, Name = location.Name, }); }
/// <summary> /// Map location without order history /// </summary> /// <param name="location"></param> /// <returns></returns> public static BusinessLogic.Models.Location MapLocationWithoutOH(Entities.Locations location) { return(new BusinessLogic.Models.Location { ID = location.LocationId, Name = location.Name, Inventory = location.InventoryItems.ToDictionary(o => MapProduct(o.Product), o => o.Quantity) }); }
public static BusinessLogic.Models.Location MapLocation(Entities.Locations location) { return(new BusinessLogic.Models.Location { ID = location.LocationId, Name = location.Name, OrderHistory = location.Orders.Select(MapOrder).ToHashSet(), Inventory = location.InventoryItems.ToDictionary(o => MapProduct(o.Product), o => o.Quantity) }); }