Esempio n. 1
0
 public static Library.Customer Map(Entities.Customer customer) => new Library.Customer
 {
     Id          = customer.Id,
     FirstName   = customer.FirstName,
     LastName    = customer.LastName,
     PhoneNumber = customer.PhoneNumber,
     PurOrder    = customer.PurOrder.Select(Map).ToList()
 };
Esempio n. 2
0
        public void AddCustomer(Library.Customer customer)
        {
            Entities.Customer entity = Mapper.Map(customer);

            _dbContext.Add(entity);
        }