DbQuery.IEnumerable.GetEnumerator 方法
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
傳回 IEnumerator,其在列舉時會對資料庫執行查詢。
命名空間: System.Data.Entity.Infrastructure
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")> _
Private Function GetEnumerator As IEnumerator
Implements IEnumerable.GetEnumerator
'用途
Dim instance As DbQuery
Dim returnValue As IEnumerator
returnValue = CType(instance, IEnumerable).GetEnumerator()
[SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
IEnumerator IEnumerable.GetEnumerator()
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
private:
virtual IEnumerator^ GetEnumerator() sealed = IEnumerable::GetEnumerator
[<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")>]
private abstract GetEnumerator : unit -> IEnumerator
[<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")>]
private override GetEnumerator : unit -> IEnumerator
JScript supports the use of explicit interface implementations, but not the declarations of new ones.
傳回值
類型:System.Collections.IEnumerator
查詢結果。