DataServiceProviderMethods.OfType<TSource, TResult> Method (IQueryable<TSource>, ResourceType)
Filters the supplied query based on the specified ResourceType.
Namespace: System.Data.Services.Providers
Assembly: Microsoft.Data.Services (in Microsoft.Data.Services.dll)
Syntax
'Declaration
Public Shared Function OfType(Of TSource, TResult) ( _
query As IQueryable(Of TSource), _
resourceType As ResourceType _
) As IQueryable(Of TResult)
'Usage
Dim query As IQueryable(Of TSource)
Dim resourceType As ResourceType
Dim returnValue As IQueryable(Of TResult)
returnValue = DataServiceProviderMethods.OfType(query, _
resourceType)
public static IQueryable<TResult> OfType<TSource, TResult>(
IQueryable<TSource> query,
ResourceType resourceType
)
public:
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<T> instance supplied as the query parameter.
- TResult
Type representing the resource type supplied as the resourceType parameter.
Parameters
- query
Type: System.Linq.IQueryable<TSource>
The IQueryable<T> instance to be filtered.
- resourceType
Type: System.Data.Services.Providers.ResourceType
ResourceType used to filter the query.
Return Value
Type: System.Linq.IQueryable<TResult>
Returns an IQueryable<T> instance filtered by the supplied resourceType.