Show / Hide Table of Contents

Class NpgsqlDataReader

Reads a forward-only stream of rows from a data source.

Inheritance
System.Object
System.MarshalByRefObject
System.Data.Common.DbDataReader
NpgsqlDataReader
Implements
System.Data.IDataReader
System.IDisposable
System.Data.IDataRecord
System.Collections.IEnumerable
Inherited Members
System.Data.Common.DbDataReader.System.Data.IDataRecord.GetData(System.Int32)
System.Data.Common.DbDataReader.GetDbDataReader(System.Int32)
System.Data.Common.DbDataReader.GetFieldValueAsync<T>(System.Int32)
System.Data.Common.DbDataReader.IsDBNullAsync(System.Int32)
System.Data.Common.DbDataReader.ReadAsync()
System.Data.Common.DbDataReader.NextResultAsync()
System.Data.Common.DbDataReader.VisibleFieldCount
System.MarshalByRefObject.MemberwiseClone(System.Boolean)
System.MarshalByRefObject.GetLifetimeService()
System.MarshalByRefObject.InitializeLifetimeService()
System.MarshalByRefObject.CreateObjRef(System.Type)
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Npgsql
Assembly: Npgsql.dll
Syntax
public sealed class NpgsqlDataReader : DbDataReader, IDataReader, IDisposable, IDataRecord, IEnumerable

Properties

Depth

Gets a value indicating the depth of nesting for the current row. Always returns zero.

Declaration
public override int Depth { get; }
Property Value
Type Description
System.Int32
Overrides
System.Data.Common.DbDataReader.Depth

FieldCount

Gets the number of columns in the current row.

Declaration
public override int FieldCount { get; }
Property Value
Type Description
System.Int32
Overrides
System.Data.Common.DbDataReader.FieldCount

HasRows

Gets a value that indicates whether this DbDataReader contains one or more rows.

Declaration
public override bool HasRows { get; }
Property Value
Type Description
System.Boolean
Overrides
System.Data.Common.DbDataReader.HasRows

IsClosed

Gets a value indicating whether the data reader is closed.

Declaration
public override bool IsClosed { get; }
Property Value
Type Description
System.Boolean
Overrides
System.Data.Common.DbDataReader.IsClosed

IsOnRow

Indicates whether the reader is currently positioned on a row, i.e. whether reading a column is possible. This property is different from HasRows in that HasRows will return true even if attempting to read a column will fail, e.g. before Read() has been called

Declaration
public bool IsOnRow { get; }
Property Value
Type Description
System.Boolean

Item[Int32]

Gets the value of the specified column as an instance of System.Object.

Declaration
public override object this[int ordinal] { get; }
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Property Value
Type Description
System.Object

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.Item[System.Int32]

Item[String]

Gets the value of the specified column as an instance of System.Object.

Declaration
public override object this[string name] { get; }
Parameters
Type Name Description
System.String name

The name of the column.

Property Value
Type Description
System.Object

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.Item[System.String]

RecordsAffected

Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.

Declaration
public override int RecordsAffected { get; }
Property Value
Type Description
System.Int32
Overrides
System.Data.Common.DbDataReader.RecordsAffected

Statements

Returns details about each statement that this reader will or has executed.

Declaration
public IReadOnlyList<NpgsqlStatement> Statements { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyList<NpgsqlStatement>
Remarks

Note that some fields (i.e. rows and oid) are only populated as the reader traverses the result.

For commands with multiple queries, this exposes the number of rows affected on a statement-by-statement basis, unlike RecordsAffected which exposes an aggregation across all statements.

Methods

Close()

Closes the NpgsqlDataReader reader, allowing a new command to be executed.

Declaration
public override void Close()
Overrides
System.Data.Common.DbDataReader.Close()

CloseAsync()

Closes the NpgsqlDataReader reader, allowing a new command to be executed.

Declaration
public Task CloseAsync()
Returns
Type Description
System.Threading.Tasks.Task

Dispose(Boolean)

Releases the resources used by the NpgsqlDataReader.

Declaration
protected override void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing
Overrides
System.Data.Common.DbDataReader.Dispose(System.Boolean)

DisposeAsync()

Releases the resources used by the NpgsqlDataReader.

Declaration
public ValueTask DisposeAsync()
Returns
Type Description
ValueTask

GetBoolean(Int32)

Gets the value of the specified column as a Boolean.

Declaration
public override bool GetBoolean(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Boolean

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.GetBoolean(System.Int32)

GetByte(Int32)

Gets the value of the specified column as a byte.

Declaration
public override byte GetByte(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Byte

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.GetByte(System.Int32)

GetBytes(Int32, Int64, Byte[], Int32, Int32)

Reads a stream of bytes from the specified column, starting at location indicated by dataOffset, into the buffer, starting at the location indicated by bufferOffset.

Declaration
public override long GetBytes(int ordinal, long dataOffset, byte[] buffer, int bufferOffset, int length)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

System.Int64 dataOffset

The index within the row from which to begin the read operation.

System.Byte[] buffer

The buffer into which to copy the data.

System.Int32 bufferOffset

The index with the buffer to which the data will be copied.

System.Int32 length

The maximum number of characters to read.

Returns
Type Description
System.Int64

The actual number of bytes read.

Overrides
System.Data.Common.DbDataReader.GetBytes(System.Int32, System.Int64, System.Byte[], System.Int32, System.Int32)

GetChar(Int32)

Gets the value of the specified column as a single character.

Declaration
public override char GetChar(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Char

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.GetChar(System.Int32)

GetChars(Int32, Int64, Char[], Int32, Int32)

Reads a stream of characters from the specified column, starting at location indicated by dataOffset, into the buffer, starting at the location indicated by bufferOffset.

Declaration
public override long GetChars(int ordinal, long dataOffset, char[] buffer, int bufferOffset, int length)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

System.Int64 dataOffset

The index within the row from which to begin the read operation.

System.Char[] buffer

The buffer into which to copy the data.

System.Int32 bufferOffset

The index with the buffer to which the data will be copied.

System.Int32 length

The maximum number of characters to read.

Returns
Type Description
System.Int64

The actual number of characters read.

Overrides
System.Data.Common.DbDataReader.GetChars(System.Int32, System.Int64, System.Char[], System.Int32, System.Int32)

GetColumnSchema()

Returns schema information for the columns in the current resultset.

Declaration
public ReadOnlyCollection<NpgsqlDbColumn> GetColumnSchema()
Returns
Type Description
System.Collections.ObjectModel.ReadOnlyCollection<NpgsqlDbColumn>

GetDataTypeName(Int32)

Gets the data type information for the specified field. This will be the PostgreSQL type name (e.g. double precision), not the .NET type (see GetFieldType(Int32) for that).

Declaration
public override string GetDataTypeName(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column index.

Returns
Type Description
System.String
Overrides
System.Data.Common.DbDataReader.GetDataTypeName(System.Int32)

GetDataTypeOID(Int32)

Gets the OID for the PostgreSQL type for the specified field, as it appears in the pg_type table.

Declaration
public uint GetDataTypeOID(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column index.

Returns
Type Description
System.UInt32
Remarks

This is a PostgreSQL-internal value that should not be relied upon and should only be used for debugging purposes.

GetDate(Int32)

Gets the value of the specified column as an NpgsqlDate, Npgsql's provider-specific type for dates.

Declaration
public NpgsqlDate GetDate(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
NpgsqlDate

The value of the specified column.

Remarks

PostgreSQL's date type represents dates from 4713 BC to 5874897 AD, while .NET's DateTime only supports years from 1 to 1999. If you require years outside this range use this accessor. The standard System.Data.Common.DbDataReader.GetProviderSpecificValue(System.Int32) method will also return this type, but has the disadvantage of boxing the value. See http://www.postgresql.org/docs/current/static/datatype-datetime.html

GetDateTime(Int32)

Gets the value of the specified column as a System.DateTime object.

Declaration
public override DateTime GetDateTime(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.DateTime

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.GetDateTime(System.Int32)

GetDecimal(Int32)

Gets the value of the specified column as a System.Decimal object.

Declaration
public override decimal GetDecimal(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Decimal

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.GetDecimal(System.Int32)

GetDouble(Int32)

Gets the value of the specified column as a double-precision floating point number.

Declaration
public override double GetDouble(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Double

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.GetDouble(System.Int32)

GetEnumerator()

Returns an System.Collections.IEnumerator that can be used to iterate through the rows in the data reader.

Declaration
public override IEnumerator GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

An System.Collections.IEnumerator that can be used to iterate through the rows in the data reader.

Overrides
System.Data.Common.DbDataReader.GetEnumerator()

GetFieldType(Int32)

Gets the data type of the specified column.

Declaration
public override Type GetFieldType(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Type

The data type of the specified column.

Overrides
System.Data.Common.DbDataReader.GetFieldType(System.Int32)

GetFieldValue<T>(Int32)

Synchronously gets the value of the specified column as a type.

Declaration
public override T GetFieldValue<T>(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The column to be retrieved.

Returns
Type Description
T

The column to be retrieved.

Type Parameters
Name Description
T

Synchronously gets the value of the specified column as a type.

Overrides
System.Data.Common.DbDataReader.GetFieldValue<T>(System.Int32)

GetFieldValueAsync<T>(Int32, CancellationToken)

Asynchronously gets the value of the specified column as a type.

Declaration
public override Task<T> GetFieldValueAsync<T>(int ordinal, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Int32 ordinal

The type of the value to be returned.

System.Threading.CancellationToken cancellationToken

The token to monitor for cancellation requests.

Returns
Type Description
System.Threading.Tasks.Task<T>
Type Parameters
Name Description
T

The type of the value to be returned.

Overrides
System.Data.Common.DbDataReader.GetFieldValueAsync<T>(System.Int32, System.Threading.CancellationToken)

GetFloat(Int32)

Gets the value of the specified column as a single-precision floating point number.

Declaration
public override float GetFloat(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Single

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.GetFloat(System.Int32)

GetGuid(Int32)

Gets the value of the specified column as a globally-unique identifier (GUID).

Declaration
public override Guid GetGuid(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Guid

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.GetGuid(System.Int32)

GetInt16(Int32)

Gets the value of the specified column as a 16-bit signed integer.

Declaration
public override short GetInt16(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Int16

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.GetInt16(System.Int32)

GetInt32(Int32)

Gets the value of the specified column as a 32-bit signed integer.

Declaration
public override int GetInt32(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Int32

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.GetInt32(System.Int32)

GetInt64(Int32)

Gets the value of the specified column as a 64-bit signed integer.

Declaration
public override long GetInt64(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Int64

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.GetInt64(System.Int32)

GetInterval(Int32)

Gets the value of the specified column as an NpgsqlTimeSpan, Npgsql's provider-specific type for time spans.

Declaration
public NpgsqlTimeSpan GetInterval(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
NpgsqlTimeSpan

The value of the specified column.

Remarks

PostgreSQL's interval type has has a resolution of 1 microsecond and ranges from -178000000 to 178000000 years, while .NET's TimeSpan has a resolution of 100 nanoseconds and ranges from roughly -29247 to 29247 years. If you require values from outside TimeSpan's range use this accessor. The standard ADO.NET System.Data.Common.DbDataReader.GetProviderSpecificValue(System.Int32) method will also return this type, but has the disadvantage of boxing the value. See http://www.postgresql.org/docs/current/static/datatype-datetime.html

GetName(Int32)

Gets the name of the column, given the zero-based column ordinal.

Declaration
public override string GetName(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.String

The name of the specified column.

Overrides
System.Data.Common.DbDataReader.GetName(System.Int32)

GetOrdinal(String)

Gets the column ordinal given the name of the column.

Declaration
public override int GetOrdinal(string name)
Parameters
Type Name Description
System.String name

The name of the column.

Returns
Type Description
System.Int32

The zero-based column ordinal.

Overrides
System.Data.Common.DbDataReader.GetOrdinal(System.String)

GetPostgresType(Int32)

Gets a representation of the PostgreSQL data type for the specified field. The returned representation can be used to access various information about the field.

Declaration
public PostgresType GetPostgresType(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column index.

Returns
Type Description
PostgresType

GetProviderSpecificFieldType(Int32)

Returns the provider-specific field type of the specified column.

Declaration
public override Type GetProviderSpecificFieldType(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Type

The Type object that describes the data type of the specified column.

Overrides
System.Data.Common.DbDataReader.GetProviderSpecificFieldType(System.Int32)

GetProviderSpecificValue(Int32)

Gets the value of the specified column as an instance of System.Object.

Declaration
public override object GetProviderSpecificValue(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Object

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.GetProviderSpecificValue(System.Int32)

GetProviderSpecificValues(Object[])

Gets all provider-specific attribute columns in the collection for the current row.

Declaration
public override int GetProviderSpecificValues(object[] values)
Parameters
Type Name Description
System.Object[] values

An array of Object into which to copy the attribute columns.

Returns
Type Description
System.Int32

The number of instances of System.Object in the array.

Overrides
System.Data.Common.DbDataReader.GetProviderSpecificValues(System.Object[])

GetSchemaTable()

Returns a System.Data.DataTable that describes the column metadata of the DataReader.

Declaration
public override DataTable GetSchemaTable()
Returns
Type Description
System.Data.DataTable
Overrides
System.Data.Common.DbDataReader.GetSchemaTable()

GetStream(Int32)

Retrieves data as a System.IO.Stream.

Declaration
public override Stream GetStream(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.IO.Stream

The returned object.

Overrides
System.Data.Common.DbDataReader.GetStream(System.Int32)

GetStreamAsync(Int32)

Retrieves data as a System.IO.Stream.

Declaration
public Task<Stream> GetStreamAsync(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Threading.Tasks.Task<System.IO.Stream>

The returned object.

GetStreamAsync(Int32, CancellationToken)

Retrieves data as a System.IO.Stream.

Declaration
public Task<Stream> GetStreamAsync(int ordinal, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

System.Threading.CancellationToken cancellationToken

The token to monitor for cancellation requests. The default value is System.Threading.CancellationToken.None.

Returns
Type Description
System.Threading.Tasks.Task<System.IO.Stream>

The returned object.

GetString(Int32)

Gets the value of the specified column as an instance of System.String.

Declaration
public override string GetString(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.String

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.GetString(System.Int32)

GetTextReader(Int32)

Retrieves data as a System.IO.TextReader.

Declaration
public override TextReader GetTextReader(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.IO.TextReader

The returned object.

Overrides
System.Data.Common.DbDataReader.GetTextReader(System.Int32)

GetTextReaderAsync(Int32)

Retrieves data as a System.IO.TextReader.

Declaration
public Task<TextReader> GetTextReaderAsync(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Threading.Tasks.Task<System.IO.TextReader>

The returned object.

GetTextReaderAsync(Int32, CancellationToken)

Retrieves data as a System.IO.TextReader.

Declaration
public Task<TextReader> GetTextReaderAsync(int ordinal, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

System.Threading.CancellationToken cancellationToken

The token to monitor for cancellation requests. The default value is System.Threading.CancellationToken.None.

Returns
Type Description
System.Threading.Tasks.Task<System.IO.TextReader>

The returned object.

GetTimeSpan(Int32)

Gets the value of the specified column as a TimeSpan,

Declaration
public TimeSpan GetTimeSpan(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.TimeSpan

The value of the specified column.

Remarks

PostgreSQL's interval type has has a resolution of 1 microsecond and ranges from -178000000 to 178000000 years, while .NET's TimeSpan has a resolution of 100 nanoseconds and ranges from roughly -29247 to 29247 years. See http://www.postgresql.org/docs/current/static/datatype-datetime.html

GetTimeStamp(Int32)

Gets the value of the specified column as an NpgsqlDateTime, Npgsql's provider-specific type for date/time timestamps. Note that this type covers both PostgreSQL's "timestamp with time zone" and "timestamp without time zone" types, which differ only in how they are converted upon input/output.

Declaration
public NpgsqlDateTime GetTimeStamp(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
NpgsqlDateTime

The value of the specified column.

Remarks

PostgreSQL's timestamp type represents dates from 4713 BC to 5874897 AD, while .NET's DateTime only supports years from 1 to 1999. If you require years outside this range use this accessor. The standard System.Data.Common.DbDataReader.GetProviderSpecificValue(System.Int32) method will also return this type, but has the disadvantage of boxing the value. See http://www.postgresql.org/docs/current/static/datatype-datetime.html

GetValue(Int32)

Gets the value of the specified column as an instance of System.Object.

Declaration
public override object GetValue(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Object

The value of the specified column.

Overrides
System.Data.Common.DbDataReader.GetValue(System.Int32)

GetValues(Object[])

Populates an array of objects with the column values of the current row.

Declaration
public override int GetValues(object[] values)
Parameters
Type Name Description
System.Object[] values

An array of Object into which to copy the attribute columns.

Returns
Type Description
System.Int32

The number of instances of System.Object in the array.

Overrides
System.Data.Common.DbDataReader.GetValues(System.Object[])

IsDBNull(Int32)

Gets a value that indicates whether the column contains nonexistent or missing values.

Declaration
public override bool IsDBNull(int ordinal)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column ordinal.

Returns
Type Description
System.Boolean

true if the specified column is equivalent to System.DBNull; otherwise false.

Overrides
System.Data.Common.DbDataReader.IsDBNull(System.Int32)

IsDBNullAsync(Int32, CancellationToken)

An asynchronous version of IsDBNull(Int32), which gets a value that indicates whether the column contains non-existent or missing values. The cancellationToken parameter is currently ignored.

Declaration
public override Task<bool> IsDBNullAsync(int ordinal, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Int32 ordinal

The zero-based column to be retrieved.

System.Threading.CancellationToken cancellationToken

The token to monitor for cancellation requests.

Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>

true if the specified column value is equivalent to System.DBNull otherwise false.

Overrides
System.Data.Common.DbDataReader.IsDBNullAsync(System.Int32, System.Threading.CancellationToken)

NextResult()

Advances the reader to the next result when reading the results of a batch of statements.

Declaration
public override bool NextResult()
Returns
Type Description
System.Boolean
Overrides
System.Data.Common.DbDataReader.NextResult()

NextResultAsync(CancellationToken)

This is the asynchronous version of NextResult. The cancellationToken parameter is currently ignored.

Declaration
public override Task<bool> NextResultAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken

The token to monitor for cancellation requests.

Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>

A task representing the asynchronous operation.

Overrides
System.Data.Common.DbDataReader.NextResultAsync(System.Threading.CancellationToken)

Read()

Advances the reader to the next record in a result set.

Declaration
public override bool Read()
Returns
Type Description
System.Boolean

true if there are more rows; otherwise false.

Overrides
System.Data.Common.DbDataReader.Read()
Remarks

The default position of a data reader is before the first record. Therefore, you must call Read to begin accessing data.

ReadAsync(CancellationToken)

This is the asynchronous version of Read() The cancellation token is currently ignored.

Declaration
public override Task<bool> ReadAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken

The token to monitor for cancellation requests.

Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>

A task representing the asynchronous operation.

Overrides
System.Data.Common.DbDataReader.ReadAsync(System.Threading.CancellationToken)

Events

ReaderClosed

Is raised whenever Close() is called.

Declaration
public event EventHandler ReaderClosed
Event Type
Type Description
System.EventHandler

Implements

System.Data.IDataReader
System.IDisposable
System.Data.IDataRecord
System.Collections.IEnumerable
In This Article
Back to top Generated by DocFX