I need to use Linq on any IDataReader implementations like this
var c = sqlDataReader.AsEnumerable().Count();
Example:
You can just load the DataReader into a DataTable and then Select():
DataReader
DataTable
Select()
DataTable dt = new DataTable(); dt.Load(dataReader); DataRow[] rows = dt.Select(); //DataRow[] Implements IEnumerable
or
IEnumerable rows = dt.AsEnumerable();