BaseCriteria.NotIn method (1 of 3)
Creates a new binary NOT IN criteria containing this criteria as the left operand.
public BaseCriteria NotIn(BaseCriteria statement)
| parameter | description |
|---|---|
| statement | The statement. |
Return Value
A new binary NOT 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 NotIn overload for subqueries, which wraps the query in parentheses, or include them in the criteria expression.
See Also
- class BaseCriteria
BaseCriteria.NotIn method (2 of 3)
Creates a new binary NOT IN criteria containing this criteria as the left operand.
public BaseCriteria NotIn(ISqlQuery statement)
| parameter | description |
|---|---|
| statement | The statement query. |
Return Value
A new binary NOT 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.NotIn<T> method (3 of 3)
Creates a new binary NOT IN criteria containing this criteria as the left operand.
public BaseCriteria NotIn<T>(params T[] values)
| parameter | description |
|---|---|
| T | The type of values. |
| values | The values. |
Return Value
A new binary NOT IN criteria.
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | values is null or zero length array |
See Also
- class BaseCriteria