Skip to content

Commit

Permalink
Ordering fix (#19220) (#19221)
Browse files Browse the repository at this point in the history
cincuranet authored and ajcvickers committed Dec 9, 2019

Verified

This commit was signed with the committer’s verified signature. The key has expired.
weihanglo Weihang Lo
1 parent da75f43 commit f76e14c
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1306,7 +1306,7 @@ from e in ss.Set<Employee>().OrderBy(ee => ee.EmployeeID).Take(3).Select(
from o in ss.Set<Order>().OrderBy(oo => oo.OrderID).Take(5).Select(
o => new { o })
select new { e, o })
from c in ss.Set<Customer>().Take(2).Select(
from c in ss.Set<Customer>().OrderBy(cc => cc.CustomerID).Take(2).Select(
c => new { c })
select new
{
Original file line number Diff line number Diff line change
@@ -830,7 +830,6 @@ public override async Task Where_subquery_anon_nested(bool async)

AssertSql(
@"@__p_0='3'
@__p_1='2'
SELECT [t].[EmployeeID], [t].[City], [t].[Country], [t].[FirstName], [t].[ReportsTo], [t].[Title], [t0].[OrderID], [t0].[CustomerID], [t0].[EmployeeID], [t0].[OrderDate], [t1].[CustomerID], [t1].[Address], [t1].[City], [t1].[CompanyName], [t1].[ContactName], [t1].[ContactTitle], [t1].[Country], [t1].[Fax], [t1].[Phone], [t1].[PostalCode], [t1].[Region]
FROM (
@@ -844,8 +843,9 @@ FROM [Orders] AS [o]
ORDER BY [o].[OrderID]
) AS [t0]
CROSS JOIN (
SELECT TOP(@__p_1) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
SELECT TOP(2) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region]
FROM [Customers] AS [c]
ORDER BY [c].[CustomerID]
) AS [t1]
WHERE [t].[City] = N'Seattle'
ORDER BY [t].[EmployeeID]");

0 comments on commit f76e14c

Please sign in to comment.