public void Create(IEnumerable <CustomerDTO> customers) { foreach (var customer in customers) { _repositry.Save(new Customer(customer.FirstName, customer.LastName)); _emailFormatter.CreateMessage(customer.Email); } }
public void Create(IEnumerable <CustomerDTO> customerDTOs) { foreach (var item in customerDTOs) { customerRepository.Save(new Customer() { FirstName = item.FirstName, LastName = item.LastName }); emailFormatter.CreateMessage(item.Email); } }