<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />

SqlDataReader

Provides a way of reading a forward-only stream of rows from a SQL Server database. This class cannot be inherited.
protected SqlConnection Connection { get; }

Gets the SqlConnection associated with the SqlDataReader.

public virtual DateTimeOffset GetDateTimeOffset(int i)

Retrieves the value of the specified column as a DateTimeOffset object.

public virtual SqlBinary GetSqlBinary(int i)

Gets the value of the specified column as a SqlBinary.

public virtual SqlBoolean GetSqlBoolean(int i)

Gets the value of the specified column as a SqlBoolean.

public virtual SqlByte GetSqlByte(int i)

Gets the value of the specified column as a SqlByte.

public virtual SqlBytes GetSqlBytes(int i)

Gets the value of the specified column as SqlBytes.

public virtual SqlChars GetSqlChars(int i)

Gets the value of the specified column as SqlChars.

public virtual SqlDateTime GetSqlDateTime(int i)

Gets the value of the specified column as a SqlDateTime.

public virtual SqlDecimal GetSqlDecimal(int i)

Gets the value of the specified column as a SqlDecimal.

public virtual SqlDouble GetSqlDouble(int i)

Gets the value of the specified column as a SqlDouble.

public virtual SqlGuid GetSqlGuid(int i)

Gets the value of the specified column as a SqlGuid.

public virtual SqlInt16 GetSqlInt16(int i)

Gets the value of the specified column as a SqlInt16.

public virtual SqlInt32 GetSqlInt32(int i)

Gets the value of the specified column as a SqlInt32.

public virtual SqlInt64 GetSqlInt64(int i)

Gets the value of the specified column as a SqlInt64.

public virtual SqlMoney GetSqlMoney(int i)

Gets the value of the specified column as a SqlMoney.

public virtual SqlSingle GetSqlSingle(int i)

Gets the value of the specified column as a SqlSingle.

public virtual SqlString GetSqlString(int i)

Gets the value of the specified column as a SqlString.

public virtual object GetSqlValue(int i)

Returns the data value in the specified column as a SQL Server type.

public virtual int GetSqlValues(object[] values)

Fills an array of Object that contains the values for all the columns in the record, expressed as SQL Server types.

public virtual SqlXml GetSqlXml(int i)

Gets the value of the specified column as an XML value.

public virtual TimeSpan GetTimeSpan(int i)

Retrieves the value of the specified column as a TimeSpan object.

public virtual XmlReader GetXmlReader(int i)

Retrieves data of type XML as an XmlReader.