Beispiel #1
0
        public List<ClientDTO> CreateDTOsForAllClients(List<Purchase> purchases)
        {
            var ClientDTOs = new List<ClientDTO>();
            var PurchaseDTOAssembler = new PurchaseDTOAssembler();

            foreach (var purchase in purchases)
            {
                var tempPurchaseDTO = PurchaseDTOAssembler.CreateDTO(purchase);
                foreach(var applicableClient in RegisteredClients.Where(p => p.DatabaseKey == purchase.DatabaseKey))
                {
                    ClientDTOs.Add(new ClientDTO { Client = applicableClient, PurchaseDTO = tempPurchaseDTO });
                }
            }
            return ClientDTOs;
        }
Beispiel #2
0
        public List <ClientDTO> CreateDTOsForAllClients(List <Purchase> purchases)
        {
            var ClientDTOs           = new List <ClientDTO>();
            var PurchaseDTOAssembler = new PurchaseDTOAssembler();

            foreach (var purchase in purchases)
            {
                var tempPurchaseDTO = PurchaseDTOAssembler.CreateDTO(purchase);
                foreach (var applicableClient in RegisteredClients.Where(p => p.DatabaseKey == purchase.DatabaseKey))
                {
                    ClientDTOs.Add(new ClientDTO {
                        Client = applicableClient, PurchaseDTO = tempPurchaseDTO
                    });
                }
            }
            return(ClientDTOs);
        }