public static Business.Library.Order MapOrder(Entities.Orders order) { return(new Business.Library.Order(MapLocation(order.Location), MapCustomer(order.Customer)) { ID = order.Id, Total = order.Total }); }
public static Business.Library.Order MapOrder(Entities.Orders order) { return(new Business.Library.Order() { ID = order.Id, CustomerID = order.CustomerId, LocationID = order.LocationId, Total = order.Total, Date = order.CreatedAt }); }
public void AddNewOrder(Order order) { Entities.Orders entity = Mapper.MapOrder(order); try { _context.Add(entity); } catch (Exception) { return; } }