Skip to content

Commit

Permalink
Tiny: Add InExpression argument check
Browse files Browse the repository at this point in the history
  • Loading branch information
roji committed Dec 8, 2019
1 parent f765b9d commit dac2192
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/EFCore.Relational/Query/SqlExpressions/InExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ private InExpression(
RelationalTypeMapping typeMapping)
: base(typeof(bool), typeMapping)
{
if (values != null
&& subquery != null)
{
throw new ArgumentException($"Either {nameof(values)} or {nameof(subquery)} must be null");
}

Item = item;
IsNegated = negated;
Subquery = subquery;
Expand Down

0 comments on commit dac2192

Please sign in to comment.