コード例 #1
0
 public static BusinessLogic.Models.Location MapLocationWithoutOI(Entities.Locations location)
 {
     return(new BusinessLogic.Models.Location
     {
         ID = location.LocationId,
         Name = location.Name,
     });
 }
コード例 #2
0
 /// <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)
     });
 }
コード例 #3
0
 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)
     });
 }