예제 #1
0
        public CustomerDTO ReturnCustomerByIdOld(int customerId)
        {
            //note - replace this with a call to the object cache ultimately
            CustomerDTO result = new CustomerDTO();

            result.ConvertCustomerToDto(_repository.ReturnCustomerByIdOld(customerId));
            return(result);
        }
예제 #2
0
        public List <CustomerDTO> ReturnAllCustomers()
        {
            //note - replace this line with a call to Chris/Nigel's service
            var customerList = _repository.ReturnAllCustomers();
            List <CustomerDTO> allCustomerDTOList = new List <CustomerDTO>();

            foreach (var customer in customerList)
            {
                CustomerDTO customerDTO = new CustomerDTO();
                customerDTO.ConvertCustomerToDto(customer);
                allCustomerDTOList.Add(customerDTO);
            }

            return(allCustomerDTOList);
        }