CsvHelper
CsvHelper copied to clipboard
IAsyncEnumerable doesnot contain the defination for ToListAsync
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();
}
Try this package. https://www.nuget.org/packages/System.Linq.Async