TopQueryOption.ApplyTo<T> Method (IQueryable<T>, ODataQuerySettings)
Apply the $top query to the given IQueryable.
Namespace: System.Web.Http.OData.Query
Assembly: System.Web.Http.OData (in System.Web.Http.OData.dll)
Syntax
'Declaration
Public Function ApplyTo(Of T) ( _
query As IQueryable(Of T), _
querySettings As ODataQuerySettings _
) As IOrderedQueryable(Of T)
'Usage
Dim instance As TopQueryOption
Dim query As IQueryable(Of T)
Dim querySettings As ODataQuerySettings
Dim returnValue As IOrderedQueryable(Of T)
returnValue = instance.ApplyTo(query, _
querySettings)
public IOrderedQueryable<T> ApplyTo<T>(
IQueryable<T> query,
ODataQuerySettings querySettings
)
public:
generic<typename T>
IOrderedQueryable<T>^ ApplyTo(
IQueryable<T>^ query,
ODataQuerySettings^ querySettings
)
member ApplyTo :
query:IQueryable<'T> *
querySettings:ODataQuerySettings -> IOrderedQueryable<'T>
JScript does not support generic types and methods.
Type Parameters
- T
Parameters
- query
Type: System.Linq.IQueryable<T>
The original IQueryable.
- querySettings
Type: System.Web.Http.OData.Query.ODataQuerySettings
The query settings to use while applying this query option.
Return Value
Type: System.Linq.IOrderedQueryable<T>
The new IQueryable after the top query has been applied.