//Reads all entities of customer there is in the DataAccessFacade. //Returns them to a list here. internal static List <Customer> ReadAll(IDataAccessFacade dataAccessFacade) { List <ICustomer> customerEntities = dataAccessFacade.ReadAllCustomers(); List <Customer> customers = new List <Customer>(); foreach (ICustomer customerEntity in customerEntities) { Customer customer = new Customer(customerEntity, dataAccessFacade); customers.Add(customer); } return(customers); }
//Reads all entities of customer there is in the DataAccessFacade. //Returns them to a list here. internal static List<Customer> ReadAll(IDataAccessFacade dataAccessFacade) { List<ICustomer> customerEntities = dataAccessFacade.ReadAllCustomers(); List<Customer> customers = new List<Customer>(); foreach (ICustomer customerEntity in customerEntities) { Customer customer = new Customer(customerEntity, dataAccessFacade); customers.Add(customer); } return customers; }