public static Business.Library.Location MapLocation(Entities.Locations location) { return(new Business.Library.Location(location.Name) { ID = location.Id }); }
public Location GetLocationByID(int id) { Entities.Locations entity = _context.Locations.Single(l => l.Id == id); Location location = Mapper.MapLocation(entity); return(location); }
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, }); }