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

            return(location);
        }
Ejemplo n.º 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,
            });
        }