Share via


SqlProviderServices.UseRowNumberOrderingInOffsetQueries Property

Definition

Gets or sets a value indicating whether the ROW_NUMBER() function is used in sort expression passed to the ORDER BY clause when OFFSET is present in query. The default value of true is recommended to obtain query results that are stable for paging operations. The value of false can be used for compatibility with previous versions of EF and will cause the sort expression to be passed unmodified to the ORDER BY clause, which can lead to unstable results if the ordering is ambiguous.

public static bool UseRowNumberOrderingInOffsetQueries { get; set; }
member this.UseRowNumberOrderingInOffsetQueries : bool with get, set
Public Shared Property UseRowNumberOrderingInOffsetQueries As Boolean

Property Value

Remarks

This flag only applies to SQL Server 2012 or later. This flag does not affect queries that have already been translated to SQL and cached, therefore applications that need to set the value to false for compatibility should do so before executing any queries.

Applies to