DbExpressionBuilder.In Method (DbExpression, IList<DbConstantExpression>)
Creates a DbInExpression that matches the result of the specifiedexpression with the results of the constant expressions in the specified list.
Assembly: EntityFramework (in EntityFramework.dll)
public static DbInExpression In( this DbExpression expression, IList<DbConstantExpression> list )
Parameters
- expression
-
Type:
System.Data.Entity.Core.Common.CommandTrees.DbExpression
A DbExpression to be matched.
- list
-
Type:
System.Collections.Generic.IList<DbConstantExpression>
A list of DbConstantExpression to test for a match.
Return Value
Type: System.Data.Entity.Core.Common.CommandTrees.DbInExpressionA new DbInExpression with the specified arguments if the DbConstantExpression listis not empty, otherwise a false constant expression.
Exception | Condition |
---|---|
ArgumentNullException | expression or list is null. |
ArgumentException | The result type of expression is different than the result type of an expression from list. |