DbQuery<TResult>.IEnumerable.GetEnumerator Method

[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]

Returns an IEnumerator<T> which when enumerated will execute the query against the database.

Namespace:  System.Data.Entity.Infrastructure
Assembly:  EntityFramework (in EntityFramework.dll)

Syntax

'Declaration
<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")> _
Private Function GetEnumerator As IEnumerator 
    Implements IEnumerable.GetEnumerator
'Usage
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.

Return Value

Type: System.Collections.IEnumerator
The query results.

Implements

IEnumerable.GetEnumerator()

See Also

Reference

DbQuery<TResult> Class

System.Data.Entity.Infrastructure Namespace