This documentation is archived and is not being maintained.

DbLimitExpression Class

Represents the restriction of the number of elements in the argument collection to the specified limit value.

Namespace:  System.Data.Common.CommandTrees
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

public sealed class DbLimitExpression : DbExpression

A DbLimitExpression can be applied to any DbExpression with a collection result type, including DbSkipExpression. DbLimitExpression provides the equivalent of the Top operation. It does not require an ordering operation to have been performed on its input. It has two Expression properties, Argument and Limit, that specify the collection and the number of rows to return respectively. DbLimitExpression also has a BooleanWithTies property that controls whether rows equal in rank to the final row are returned. WithTies defaults to false.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5 SP1