public IEnumerable <CallQueueCustomer> GetCallQueueCustomers(long callQueueId, decimal amount, int days) { var eventIdcustomerIdPairs = _eventCustomerRepository.GetCustomersForUpsellCallQueue(amount, days); if (eventIdcustomerIdPairs == null || !eventIdcustomerIdPairs.Any()) { return(null); } var callQueueCustomerList = new List <CallQueueCustomer>(); foreach (var eventIdcustomerIdPair in eventIdcustomerIdPairs) { callQueueCustomerList.Add(new CallQueueCustomer { CallQueueId = callQueueId, CustomerId = eventIdcustomerIdPair.SecondValue, EventId = eventIdcustomerIdPair.FirstValue }); } return(callQueueCustomerList); }