I am trying to get the number of rows that were returned by iterating the reader. But I always get 1 when I run this code? Did I screw up something in this?
This will get you the row count, but will leave the data reader at the end.
dataReader.Cast().Count();