ObjectQuery<'T>.Skip Method (String, String, ObjectParameter[])

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Orders the query results by the specified criteria and skips a specified number of results.

Namespace:   System.Data.Objects
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

member Skip : 
        keys:string *
        count:string *
        [<ParamArrayAttribute>] parameters:ObjectParameter[] -> ObjectQuery<'T>

Parameters

keys
Type: System.String

The key columns by which to order the results.

count
Type: System.String

The number of results to skip. This must be either a constant or a parameter reference.

parameters
Type: System.Data.Objects.ObjectParameter[]

An optional set of query parameters that should be in scope when parsing.

Return Value

Type: System.Data.Objects.ObjectQuery<'T>

A new ObjectQuery<'T> instance that is equivalent to the original instance with both ORDER BY and SKIP applied.

Exception Condition
ArgumentNullException

Any argument is null.

ArgumentException

keys is an empty string.

-or-

count is an empty string.

The Skip method cannot be used after the Top method. When you use Top after Skip, it functions like the LIMIT statement of an clause.

This example gets five Product objects after skipping the first three in the query result, sorted by Product.ListPrice.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.5
Return to top
Show: