共用方式為


ObjectQuery<T>.IEnumerable<T>.GetEnumerator 方法

[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]

傳回 IEnumerator<T>,其在列舉時會對資料庫執行指定的 SQL 查詢。

命名空間:  System.Data.Entity.Core.Objects
組件:  EntityFramework (在 EntityFramework.dll 中)

語法

'宣告
<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")> _
Private Function GetEnumerator As IEnumerator(Of T)
    Implements IEnumerable(Of T).GetEnumerator
'用途
Dim instance As ObjectQuery 
Dim returnValue As IEnumerator(Of T)

returnValue = CType(instance, IEnumerable(Of T)).GetEnumerator()
[SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
IEnumerator<T> IEnumerable<T>.GetEnumerator()
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
private:
virtual IEnumerator<T>^ GetEnumerator() sealed = IEnumerable<T>::GetEnumerator
[<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")>]
private abstract GetEnumerator : unit -> IEnumerator<'T> 
[<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")>]
private override GetEnumerator : unit -> IEnumerator<'T> 
JScript supports the use of explicit interface implementations, but not the declarations of new ones.

傳回值

類型:System.Collections.Generic.IEnumerator<T>
查詢結果。

Implements

IEnumerable<T>.GetEnumerator()

請參閱

參考

ObjectQuery<T> 類別

System.Data.Entity.Core.Objects 命名空間