Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query: Translate NegateChecked to SQL #20848

Merged
merged 1 commit into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ protected override Expression VisitUnary(UnaryExpression unaryExpression)
return _sqlExpressionFactory.Not(sqlOperand);

case ExpressionType.Negate:
case ExpressionType.NegateChecked:
return _sqlExpressionFactory.Negate(sqlOperand);

case ExpressionType.Convert:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ protected override Expression VisitUnary(UnaryExpression unaryExpression)
return _sqlExpressionFactory.Not(sqlOperand);

case ExpressionType.Negate:
case ExpressionType.NegateChecked:
return _sqlExpressionFactory.Negate(sqlOperand);

case ExpressionType.Convert:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3554,6 +3554,23 @@ public virtual Task Include_collection_with_multiple_orderbys_complex_repeated(b
assertOrder: true);
}

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task Include_collection_with_multiple_orderbys_complex_repeated_checked(bool async)
{
checked
{
return AssertIncludeQuery(
async,
ss => ss.Set<Level2>()
.Include(l2 => l2.OneToMany_Optional2)
.OrderBy(l2 => -l2.Level1_Required_Id)
.ThenBy(l2 => -l2.Level1_Required_Id).ThenBy(l2 => l2.Name),
new List<IExpectedInclude> { new ExpectedInclude<Level2>(e => e.OneToMany_Optional2, "OneToMany_Optional2") },
assertOrder: true);
}
}

[ConditionalFact]
public virtual void Entries_for_detached_entities_are_removed()
{
Expand Down Expand Up @@ -4911,7 +4928,7 @@ public virtual Task SelectMany_with_outside_reference_to_joined_table_correctly_
{
return AssertQuery(
async,
ss => from l1 in ss.Set<Level1>()
ss => from l1 in ss.Set<Level1>()
join l2 in ss.Set<Level2>() on l1.Id equals l2.Level1_Required_Id
join l3 in ss.Set<Level3>() on l2.Id equals l3.Level2_Required_Id
join l4 in ss.Set<Level4>() on l3.Id equals l4.Level3_Required_Id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ public override Task Include_collection_with_multiple_orderbys_complex_repeated(
return base.Include_collection_with_multiple_orderbys_complex_repeated(async);
}

[ConditionalTheory(Skip = "Issue#16752")]
public override Task Include_collection_with_multiple_orderbys_complex_repeated_checked(bool async)
{
return base.Include_collection_with_multiple_orderbys_complex_repeated_checked(async);
}

[ConditionalTheory(Skip = "Issue#16752")]
public override Task Include_collection_with_multiple_orderbys_member(bool async)
{
Expand Down