OfType(TSource, TResult) Method

Filters the given query based on the resourceType.

Namespace:  System.Data.Services.Providers
Assembly:  Microsoft.Data.Services (in Microsoft.Data.Services.dll)


Public Shared Function OfType(Of TSource, TResult) ( _
    query As IQueryable(Of TSource), _
    resourceType As ResourceType _
) As IQueryable(Of TResult)
Dim query As IQueryable(Of TSource)
Dim resourceType As ResourceType
Dim returnValue As IQueryable(Of TResult)

returnValue = DataServiceExecutionProviderMethods.OfType(query, _
public static IQueryable<TResult> OfType<TSource, TResult>(
    IQueryable<TSource> query,
    ResourceType resourceType
generic<typename TSource, typename TResult>
static IQueryable<TResult>^ OfType(
    IQueryable<TSource>^ query, 
    ResourceType^ resourceType
static member OfType : 
        query:IQueryable<'TSource> * 
        resourceType:ResourceType -> IQueryable<'TResult> 
JScript does not support generic types and methods.

Type Parameters

  • TSource
    Type of the IQueryable instance passed in query.
  • TResult
    Type representing the resource type passed in resourceType.


Return Value

Type: System.Linq..::..IQueryable< (Of < ( <'TResult> ) > ) >
An IQueryable instance filtered by ResourceType.

See Also


DataServiceExecutionProviderMethods Class

System.Data.Services.Providers Namespace