BaseCriteria class
namespace: Serenity.Data assembly: Serenity.Net.Services
The base criteria object type, from which all criteria types derive.
public abstract class BaseCriteria : ICriteria
Public Members
| name | description |
|---|---|
| virtual IsEmpty { get; } | Gets a value indicating whether this criteria instance is empty. |
| Contains(…) | Creates a new binary Contains criteria (LIKE '%...%') containing this criteria as the left operand. The text is treated as a literal value: LIKE special characters (%, _, [) in it are escaped and an ESCAPE '!' clause is appended. For intentional wildcards use Like instead. |
| EndsWith(…) | Creates a new binary Ends With (LIKE '%...') criteria containing this criteria as the left operand. The text is treated as a literal value: LIKE special characters (%, _, [) in it are escaped and an ESCAPE '!' clause is appended. For intentional wildcards use Like instead. |
| override Equals(…) | Must override this or will get operator overload warning. |
| override GetHashCode() | Must override this or will get operator overload warning. |
| In(…) | Creates a new binary IN criteria containing this criteria as the left operand. (2 methods) |
| In<T>(…) | Creates a new binary IN criteria containing this criteria as the left operand. |
| InStatement(…) | Creates a new binary IN criteria containing this criteria as the left operand. |
| IsNotNull() | Creates a new unary IsNotNull criteria containing this criteria as the operand. |
| IsNull() | Creates a new unary IsNull criteria containing this criteria as the operand. |
| Like(…) | Creates a new binary Like criteria containing this criteria as the left operand. The mask is a raw LIKE pattern: %, _ and [...] act as wildcards and are not escaped. For literal values see Contains, StartsWith or EndsWith. |
| LikeEscaped(…) | Creates a new binary Like criteria containing this criteria as the left operand, with an ESCAPE clause. The mask must already be escaped for the given escape character (see EscapeLikeWildcards); it is used as is. For literal values prefer Contains, StartsWith or EndsWith; for raw patterns without ESCAPE see Like. |
| NotContains(…) | Creates a new binary Not Contains criteria (NOT LIKE '%...%') containing this criteria as the left operand. The text is treated as a literal value: LIKE special characters (%, _, [) in it are escaped and an ESCAPE '!' clause is appended. For intentional wildcards use NotLike instead. |
| NotIn(…) | Creates a new binary NOT IN criteria containing this criteria as the left operand. (2 methods) |
| NotIn<T>(…) | Creates a new binary NOT IN criteria containing this criteria as the left operand. |
| NotLike(…) | Creates a new binary Not Like criteria containing this criteria as the left operand. The mask is a raw LIKE pattern: %, _ and [...] act as wildcards and are not escaped. For literal values see NotContains. |
| NotLikeEscaped(…) | Creates a new binary Not Like criteria containing this criteria as the left operand, with an ESCAPE clause. The mask must already be escaped for the given escape character (see EscapeLikeWildcards); it is used as is. For literal values prefer NotContains; for raw patterns without ESCAPE see NotLike. |
| StartsWith(…) | Creates a new binary Starts With (LIKE '...%') criteria containing this criteria as the left operand. The text is treated as a literal value: LIKE special characters (%, _, [) in it are escaped and an ESCAPE '!' clause is appended. For intentional wildcards use Like instead. |
| override ToString() | Converts the criteria to string. Raises an exception if criteria contains parameters. |
| ToString(…) | Converts the criteria to string representation while adding params to the target query. |
| virtual ToString(…) | Converts the criteria to string representation into a string builder, while adding its params to the target query. |
| ToStringIgnoreParams() | Converts the criteria to a string while ignoring its params, if any. ToString raises an exception if a criteria has params, while this does not. |
| operator & | Implements the operator &. |
| operator | | Implements the operator |. |
| operator == | Implements the operator ==. (10 operators) |
| operator ^ | Implements the operator ^. |
| operator false | Returns false so that || evaluates its right operand and combines both criteria with operator |. |
| operator > | Implements the operator >. (10 operators) |
| operator >= | Implements the operator >=. (10 operators) |
| operator != | Implements the operator !=. (10 operators) |
| operator < | Implements the operator <. (10 operators) |
| operator <= | Implements the operator <=. (10 operators) |
| operator ! | Implements the operator !. |
| operator ~ | Implements the operator ~. |
| operator true | Returns false so that && evaluates its right operand and combines both criteria with operator &. |
Protected Members
| name | description |
|---|---|
| BaseCriteria() | The default constructor. |
See Also
- interface ICriteria
- Source: BaseCriteria.cs