Skip to content

Example contradicts the Warning #3997

@keyboarder

Description

@keyboarder

The Warning box explains that it is necessary to specify proper sort order on queries that call AsSplitQuery(). Specifically it says "Note that relational databases do not apply any ordering by default, even on the primary key."

The example code immediately preceding the warning apparently contradicts this advise. It shows SQL generated from a query that took no care to specify a sort order, yet the generated SQL includes "ORDER BY [b].[BlogId]" in both SELECT statements.

So which is it? Does EF Core do some magic to pick a default sort order or not? Does the SQL in the box really come from the given C# query or not? Something needs to be updated in the document to remove the contradiction.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions