public async Task <ICollection <SupplementaryDataLooseModel> > GetESFRecordsFromFile(IEsfJobContext esfJobContext, CancellationToken cancellationToken)
        {
            _logger.LogInfo("Try and get csv from Azure blob.");

            cancellationToken.ThrowIfCancellationRequested();

            var csvConfig = GetCsvConfig();

            return(await _csvFileService.ReadAllAsync <SupplementaryDataLooseModel, ESFMapper>(esfJobContext.FileName, esfJobContext.BlobContainerName, cancellationToken, csvConfig));
        }
        public async Task <List <EasCsvRecord> > ProvideData(string fileName, string container, CancellationToken cancellationToken)
        {
            ICollection <EasCsvRecord> models = new List <EasCsvRecord>();

            try
            {
                models = await _csvFileService.ReadAllAsync <EasCsvRecord, EasCsvRecordMapper>(fileName, container, cancellationToken);
            }
            catch (System.Exception e)
            {
                throw new InvalidCsvException("Error parsing csv file. ", e);
            }

            return(models.ToList());
        }