public IList <ContractDeliverableCodeMapping> GetContractDeliverableCodeMapping( IList <string> deliverableCodes, CancellationToken cancellationToken) { var uncached = deliverableCodes.Where(deliverableCode => CodeMappings.All(x => x.ExternalDeliverableCode != deliverableCode)).ToList(); if (uncached.Any()) { CodeMappings.AddRange(_referenceDataRepository.GetContractDeliverableCodeMapping(uncached, cancellationToken)); } return(CodeMappings); }
public IEnumerable <FcsDeliverableCodeMapping> GetContractDeliverableCodeMapping( IEnumerable <string> deliverableCodes, CancellationToken cancellationToken) { var uncached = deliverableCodes .Where(deliverableCode => CodeMappings .All(x => !x.ExternalDeliverableCode.CaseInsensitiveEquals(deliverableCode))) .ToList(); if (!uncached.Any()) { return(CodeMappings); } PopulateContractDeliverableCodeMappings(uncached, cancellationToken); return(CodeMappings); }