示例#1
0
        //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);
        }
示例#2
0
        //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;
        }