DbQuery.Cast<TElement> 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 the equivalent generic DbQuery<TResult> object.
Namespace: System.Data.Entity.Infrastructure
Assembly: EntityFramework (in EntityFramework.dll)
Syntax
'Declaration
Public Function Cast(Of TElement) As DbQuery(Of TElement)
'Usage
Dim instance As DbQuery
Dim returnValue As DbQuery(Of TElement)
returnValue = instance.Cast()
public DbQuery<TElement> Cast<TElement>()
public:
generic<typename TElement>
DbQuery<TElement>^ Cast()
member Cast : unit -> DbQuery<'TElement>
JScript does not support generic types and methods.
Type Parameters
- TElement
The type of element for which the query was created.
Return Value
Type: System.Data.Entity.Infrastructure.DbQuery<TElement>
The generic set object.