CsvHelper icon indicating copy to clipboard operation
CsvHelper copied to clipboard

IAsyncEnumerable doesnot contain the defination for ToListAsync

Open avichhetri8 opened this issue 2 years ago • 1 comments

I am trying to read the csv file using the GetRecordsAsync method with ToListAsync

got error AsyncEnumerable doesnot contain the defination for ToListAsync

           using (var reader = new StreamReader(a, Encoding.UTF8))
            using (var csv = new CsvReader(reader, new CsvConfiguration(CultureInfo.InvariantCulture)
            {
                HasHeaderRecord = false
            }))
            {
                await csv.GetRecordsAsync<FileGenerator>().ToListAsync();
            }

avichhetri8 avatar May 30 '22 12:05 avichhetri8

Try this package. https://www.nuget.org/packages/System.Linq.Async

JoshClose avatar May 30 '22 15:05 JoshClose