public IEnumerable <CallQueueCustomer> GetCallQueueCustomers(long callQueueId, int noOfDays) { var eventIdCustomerIdPairs = _eventCustomerRepository.GetCustomerForConfirmationCallQueue(noOfDays); 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); }