I need to use Linq on any IDataReader implementations like this
var c = sqlDataReader.AsEnumerable().Count();
Example:
<
I've used the following but I like @Serge's suggestion better and it reminds be of what I believe I used to do but then forgot that IDataReader implements
var reader = command.ExecuteReader();
var records = Enumerable
.Range(0, int.MaxValue)
.TakeWhile(i => reader.Read())
.Select(i => reader as IDataRecord);