BaseCriteria.In method (1 of 3)
Creates a new binary IN criteria containing this criteria as the left operand.
public BaseCriteria In(BaseCriteria statement)
| parameter | description |
|---|---|
| statement | The statement. |
Return Value
A new binary IN criteria.
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | statement is null or empty |
Remarks
The statement criteria is used as is, without adding parentheses around it. Use the In overload for subqueries, which wraps the query in parentheses, or include them in the criteria expression.
See Also
- class BaseCriteria
BaseCriteria.In method (2 of 3)
Creates a new binary IN criteria containing this criteria as the left operand.
public BaseCriteria In(ISqlQuery statement)
| parameter | description |
|---|---|
| statement | The statement query. |
Return Value
A new binary IN criteria.
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | statement is null |
| InvalidOperationException | statement is an independent query with auto parameters. |
Remarks
Subqueries created via SubQuery already enclose themselves in parenthesis while rendering, so the statement is only wrapped in parenthesis when the query would render without them. The statement must share the same root query that this criteria will be used in (usually built via that query's SubQuery() method). An unrelated query's parameters are not available to the outer query, so embedding it may produce completely invalid results. Independent queries without parameters are safe to embed.
See Also
- interface ISqlQuery
- class BaseCriteria
BaseCriteria.In<T> method (3 of 3)
Creates a new binary IN criteria containing this criteria as the left operand.
public BaseCriteria In<T>(params T[] values)
| parameter | description |
|---|---|
| T | The type of values. |
| values | The values. |
Return Value
A new binary IN criteria.
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | values |
See Also
- class BaseCriteria