Share via


ApplyProjections Method

Applies expansions and projections to the specified source.

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

Syntax

'Declaration
Public Shared Function ApplyProjections ( _
    projectionProvider As Object, _
    source As IQueryable, _
    rootProjectionNode As Object _
) As IQueryable
'Usage
Dim projectionProvider As Object
Dim source As IQueryable
Dim rootProjectionNode As Object
Dim returnValue As IQueryable

returnValue = DataServiceExecutionProviderMethods.ApplyProjections(projectionProvider, _
    source, rootProjectionNode)
public static IQueryable ApplyProjections(
    Object projectionProvider,
    IQueryable source,
    Object rootProjectionNode
)
public:
static IQueryable^ ApplyProjections(
    Object^ projectionProvider, 
    IQueryable^ source, 
    Object^ rootProjectionNode
)
static member ApplyProjections : 
        projectionProvider:Object * 
        source:IQueryable * 
        rootProjectionNode:Object -> IQueryable 
public static function ApplyProjections(
    projectionProvider : Object, 
    source : IQueryable, 
    rootProjectionNode : Object
) : IQueryable

Parameters

  • rootProjectionNode
    Type: System..::..Object
    The root node of the tree which describes the projections and expansions to be applied to the source.

Return Value

Type: System.Linq..::..IQueryable
An IQueryable object, with the results including the expansions and projections specified in rootProjectionNode.

Remarks

The returned IQueryable may implement the IQueryable interface to provide enumerable objects for the expansions; otherwise, the expanded information is expected to be found directly in the enumerated objects. If paging is requested by providing a non-empty list in rootProjectionNode.OrderingInfo then it is expected that the topmost IQueryable would have a $skiptoken property which will be an IQueryable in itself and each of it's sub-properties will be named SkipTokenPropertyXX where XX represents numbers in increasing order starting from 0. Each of SkipTokenPropertyXX properties will be used to generated the $skiptoken to support paging. If projections are required, the provider may choose to return IQueryable which returns instances of IQueryable. In that case property values are determined by calling the <see cref="M:System.Data.Services.IProjectedResult.GetProjectedPropertyValue(System.String)" /> method instead of accessing properties of the returned object directly. If both expansion and projections are required, the provider may choose to return IQueryable of IQueryable which in turn returns IQueryable from its IQueryable property.

See Also

Reference

DataServiceExecutionProviderMethods Class

System.Data.Services.Providers Namespace