예제 #1
0
 public static Business.Library.Location MapLocation(Entities.Locations location)
 {
     return(new Business.Library.Location(location.Name)
     {
         ID = location.Id
     });
 }
예제 #2
0
        public Location GetLocationByID(int id)
        {
            Entities.Locations entity   = _context.Locations.Single(l => l.Id == id);
            Location           location = Mapper.MapLocation(entity);

            return(location);
        }
예제 #3
0
        public static Entities.Orders MapOrder(Business.Library.Order order)
        {
            Entities.Customers customer = MapCustomer(order.OCustomer);
            Entities.Locations location = MapLocation(order.OLocation);

            return(new Entities.Orders
            {
                Customer = customer,
                Location = location,
                CustomerId = customer.Id,
                LocationId = location.Id,
                CreatedAt = order.Date,
                Id = order.ID,
                Total = order.Total,
            });
        }