public async Task <IEnumerable <HpdidLookup> > HpdidLookupAsync(IEnumerable <string> hpdids)
        {
            hpdids.ThrowIfNull(nameof(hpdids));

            hpdids = hpdids.Where(h => !string.IsNullOrWhiteSpace(h));

            return(await _context.Enrollees
                   .Include(e => e.Agreements)
                   .Where(e => hpdids.Contains(e.HPDID))
                   .Where(e => !e.CurrentStatus.IsType(StatusType.Declined))
                   .Select(e => HpdidLookup.FromEnrollee(e))
                   .ToListAsync());
        }
Beispiel #2
0
        public async Task <IEnumerable <HpdidLookup> > HpdidLookupAsync(IEnumerable <string> hpdids)
        {
            if (hpdids == null)
            {
                throw new ArgumentNullException(nameof(hpdids));
            }

            hpdids = hpdids.Where(h => !string.IsNullOrWhiteSpace(h));

            return(await _context.Enrollees
                   .Include(e => e.AccessTerms)
                   .Where(e => hpdids.Contains(e.HPDID))
                   .Where(e => !e.CurrentStatus.IsType(StatusType.Declined))
                   .Select(e => HpdidLookup.FromEnrollee(e))
                   .ToListAsync());
        }