public static BusinessLogic.Models.Customer MapCustomerWithoutOrders(Entities.Customers customer) { return(new BusinessLogic.Models.Customer { ID = customer.CustomerId, FirstName = customer.FirstName, LastName = customer.LastName, Phone = customer.Phone, }); }
public static BusinessLogic.Models.Customer MapCustomer(Entities.Customers customer) { return(new BusinessLogic.Models.Customer { ID = customer.CustomerId, FirstName = customer.FirstName, LastName = customer.LastName, Phone = customer.Phone, OrderHistory = customer.Orders.Select(MapOrder).ToList() }); }