Skip to content

Commit

Permalink
Update to .NET 6 Preview 7
Browse files Browse the repository at this point in the history
Resolves #25148
  • Loading branch information
bricelam committed Jul 28, 2021
1 parent cfdcd25 commit 7a52f7d
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 66 deletions.
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "6.0.100-preview.7.21373.8",
"dotnet": "6.0.100-preview.7.21377.35",
"runtimes": {
"dotnet": [
"3.1.16",
Expand All @@ -13,7 +13,7 @@
}
},
"sdk": {
"version": "6.0.100-preview.7.21373.8",
"version": "6.0.100-preview.7.21377.35",
"allowPrerelease": true,
"rollForward": "latestMajor"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1098,27 +1098,27 @@ public override Task Project_keyless_entity_FirstOrDefault_without_orderby(bool
return base.Project_keyless_entity_FirstOrDefault_without_orderby(async);
}

// public override async Task Reverse_changes_asc_order_to_desc(bool async)
// {
// await base.Reverse_changes_asc_order_to_desc(async);

// AssertSql(
// @"SELECT c[""EmployeeID""]
//FROM root c
//WHERE (c[""Discriminator""] = ""Employee"")
//ORDER BY c[""EmployeeID""] DESC");
// }

// public override async Task Reverse_changes_desc_order_to_asc(bool async)
// {
// await base.Reverse_changes_desc_order_to_asc(async);

// AssertSql(
// @"SELECT c[""EmployeeID""]
//FROM root c
//WHERE (c[""Discriminator""] = ""Employee"")
//ORDER BY c[""EmployeeID""]");
// }
public override async Task Reverse_changes_asc_order_to_desc(bool async)
{
await base.Reverse_changes_asc_order_to_desc(async);

AssertSql(
@"SELECT c[""EmployeeID""]
FROM root c
WHERE (c[""Discriminator""] = ""Employee"")
ORDER BY c[""EmployeeID""] DESC");
}

public override async Task Reverse_changes_desc_order_to_asc(bool async)
{
await base.Reverse_changes_desc_order_to_asc(async);

AssertSql(
@"SELECT c[""EmployeeID""]
FROM root c
WHERE (c[""Discriminator""] = ""Employee"")
ORDER BY c[""EmployeeID""]");
}

[ConditionalTheory(Skip = "Issue#17246")]
public override Task Projection_AsEnumerable_projection(bool async)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -894,30 +894,29 @@ public virtual Task Projection_in_a_subquery_should_be_liftable(bool async)
.Skip(1));
}

// Doesn't work in .NET 6
//[ConditionalTheory]
//[MemberData(nameof(IsAsyncData))]
//public virtual Task Reverse_changes_asc_order_to_desc(bool async)
//{
// return AssertQuery(
// async,
// ss => ss.Set<Employee>().OrderBy(e => e.EmployeeID)
// .Reverse()
// .Select(e => $"{e.EmployeeID}"),
// assertOrder: true);
//}

//[ConditionalTheory]
//[MemberData(nameof(IsAsyncData))]
//public virtual Task Reverse_changes_desc_order_to_asc(bool async)
//{
// return AssertQuery(
// async,
// ss => ss.Set<Employee>().OrderByDescending(e => e.EmployeeID)
// .Select(e => $"{e.EmployeeID}")
// .Reverse(),
// assertOrder: true);
//}
[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task Reverse_changes_asc_order_to_desc(bool async)
{
return AssertQuery(
async,
ss => ss.Set<Employee>().OrderBy(e => e.EmployeeID)
.Reverse()
.Select(e => $"{e.EmployeeID}"),
assertOrder: true);
}

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task Reverse_changes_desc_order_to_asc(bool async)
{
return AssertQuery(
async,
ss => ss.Set<Employee>().OrderByDescending(e => e.EmployeeID)
.Select(e => $"{e.EmployeeID}")
.Reverse(),
assertOrder: true);
}

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1361,25 +1361,25 @@ LEFT JOIN (
) AS [t0] ON [c].[CompanyName] = [t0].[CompanyName]");
}

// public override async Task Reverse_changes_asc_order_to_desc(bool async)
// {
// await base.Reverse_changes_asc_order_to_desc(async);

// AssertSql(
// @"SELECT [e].[EmployeeID]
//FROM [Employees] AS [e]
//ORDER BY [e].[EmployeeID] DESC");
// }

// public override async Task Reverse_changes_desc_order_to_asc(bool async)
// {
// await base.Reverse_changes_desc_order_to_asc(async);

// AssertSql(
// @"SELECT [e].[EmployeeID]
//FROM [Employees] AS [e]
//ORDER BY [e].[EmployeeID]");
// }
public override async Task Reverse_changes_asc_order_to_desc(bool async)
{
await base.Reverse_changes_asc_order_to_desc(async);

AssertSql(
@"SELECT [e].[EmployeeID]
FROM [Employees] AS [e]
ORDER BY [e].[EmployeeID] DESC");
}

public override async Task Reverse_changes_desc_order_to_asc(bool async)
{
await base.Reverse_changes_desc_order_to_asc(async);

AssertSql(
@"SELECT [e].[EmployeeID]
FROM [Employees] AS [e]
ORDER BY [e].[EmployeeID]");
}

public override async Task Projection_AsEnumerable_projection(bool async)
{
Expand Down

0 comments on commit 7a52f7d

Please sign in to comment.