語言

EntityDataReader 類別

定義

entity client provider 的資料讀取類別

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")]
public class EntityDataReader : System.Data.Common.DbDataReader, System.Data.Entity.Core.IExtendedDataRecord
type EntityDataReader = class
    inherit DbDataReader
    interface IExtendedDataRecord
    interface IDataRecord
Public Class EntityDataReader
Inherits DbDataReader
Implements IExtendedDataRecord
繼承
EntityDataReader
屬性
實作

屬性

名稱 Description
DataRecordInfo

為了這個IExtendedDataRecord。DataRecordInfo

Depth

取得值,指出目前數據列的巢狀深度。

FieldCount

取得目前數據列中的數據行數目。

HasRows

會得到一個值,表示該資料 EntityDataReader 是否包含一列或多列。

IsClosed

會得到一個值,表示是否 EntityDataReader 封閉。

Item[Int32]

取得指定欄位的值,作為 的 Object實例。

Item[String]

取得指定欄位的值,作為 的 Object實例。

RecordsAffected

取得執行 SQL 陳述句時所變更、插入或刪除的列數。

VisibleFieldCount

取得中未被隱藏的欄位 EntityDataReader 數量。

方法

名稱 Description
Close()

關閉 EntityDataReader 物件。

Dispose(Boolean)

釋放被 EntityDataReader 此消耗的資源並呼叫 Close() 。

GetBoolean(Int32)

取得指定之數據行的值做為布爾值。

GetByte(Int32)

取得指定數據行的值做為位元組。

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

從指定欄位讀取一串位元組,從 dataIndex 指示的位置開始,讀取到 buffer,從 bufferIndex 指示的位置開始。

GetChar(Int32)

取得指定數據行的值做為單一字元。

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

從指定欄位讀取一串字元,從 dataIndex 指示的位置開始,讀取到 buffer,從 bufferIndex 指示的位置開始。

GetDataReader(Int32)

將巢狀讀取器以 DbDataReader 物件回傳。

GetDataRecord(Int32)

返回巢狀 DbDataRecord的 。

GetDataTypeName(Int32)

取得指定欄位的資料型態名稱。

GetDateTime(Int32)

取得指定欄位的值作為 DateTime 物件。

GetDbDataReader(Int32)

回傳 DbDataReader 請求欄位序數的物件,該物件可用提供者專屬實作覆寫。

GetDecimal(Int32)

取得指定欄位的值作為 Decimal 物件。

GetDouble(Int32)

取得指定數據行的值,做為雙精確度浮點數。

GetEnumerator()

回傳 和 IEnumerator 可用於資料讀取器中遍歷各列。

GetFieldType(Int32)

取得指定數據行的數據類型。

GetFloat(Int32)

取得指定數據行的值做為單精度浮點數。

GetGuid(Int32)

取得指定數據行的值,做為全域唯一標識碼 (GUID)。

GetInt16(Int32)

取得指定數據行的值,做為16位帶正負號的整數。

GetInt32(Int32)

取得指定數據行的值,做為32位帶正負號的整數。

GetInt64(Int32)

取得指定數據行的值,做為64位帶正負號的整數。

GetName(Int32)

給定以零為基礎的列序數,得到該欄的名稱。

GetOrdinal(String)

得到欄位序數,該欄位名稱相同。

GetProviderSpecificFieldType(Int32)

回傳指定欄位的提供者專屬欄位類型。

GetProviderSpecificValue(Int32)

取得指定欄位的值,作為 的 Object實例。

GetProviderSpecificValues(Object[])

取得目前數據列集合中的所有提供者特定屬性數據行。

GetSchemaTable()

回傳描述 欄位元資料DbDataReader的 aDataTable。

GetString(Int32)

取得指定欄位的值,作為 的 String實例。

GetValue(Int32)

取得指定欄位的值,作為 的 Object實例。

GetValues(Object[])

使用目前數據列的數據行值填入 物件的陣列。

IsDBNull(Int32)

取得值,這個值表示數據行是否包含不存在或遺漏的值。

NextResult()

讀取一組語句結果時,會將讀者推進到下一個結果。

NextResultAsync(CancellationToken)

在讀取一批語句時,非同步地將讀取器移至下一個結果集

Read()

將讀取器推進到結果集中的下一個記錄。

ReadAsync(CancellationToken)

非同步地將讀取器移至當前結果集的下一列

適用於