IDataReader
IDataReader is an interface in the .NET Framework that represents a read-only stream of data from a data source. It is a fundamental component for accessing data in a forward-only, connected manner. When you execute a query that returns multiple rows and columns, a data provider typically returns an IDataReader object.
The primary purpose of IDataReader is to provide efficient, low-level access to data. It allows you to
Key methods of the IDataReader interface include Read(), which advances the reader to the next record, and
IDataReader is designed for a single, forward-only pass through the data. You cannot move backward or jump
Commonly, IDataReader is used in conjunction with commands executed against databases. For instance, a SqlCommand object