How to get a list of IDataRecord from IDataReader returned by Snowflake .net client?

343 Views Asked by At

If we use Microsoft SQL Database, then we get SQLDataReader object when ExecuteReader() function is executed. So we have a function for converting SQLDataReader object into List of IDataRecord which can be used later on when the connection is closed:

List<IDataRecord> rows;
using ( var result = command.ExecuteReader() )
{
    rows = result.Cast<IDataRecord>().ToList();
}

But I have to use snowflake client to get rows from snowflake warehouse. And ExecuteReader() function in return gives IDataReader object. But I am unable to get a list of that whole data maybe in any dataset that can be used later. Can anyone guide me that how I can get all the returned rows from snowflake warehouse into a list?

0

There are 0 best solutions below