BaseCriteria class

namespace: Serenity.Data   assemblySerenity.Net.Data

Base criteria object type

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.
EndsWith(…) Creates a new binary Ends With (LIKE '%...') criteria containing this criteria as the left operand.
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.
NotContains(…) Creates a new binary Not Contains criteria (NOT LIKE '%...%') containing this criteria as the left operand.
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.
StartsWith(…) Creates a new binary Stars With (LIKE '...%') criteria containing this criteria as the left operand.
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 string while ignoring its params if any. ToString() raises an exception if a criteria has params, while this not.
operator & Implements the operator &.
operator | Implements the operator |.
operator == Implements the operator ==. (10 operators)
operator ^ Implements the operator ^.
operator false Must return FALSE from this for short circuit OR (||) to return a new binary criteria merging left and right operands in any case
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 Must ALSO return FALSE from this for short circuit AND (&&) to return a new binary criteria merging left and right operands in any case https://msdn.microsoft.com/en-us/library/aa691312

Protected Members

name description
BaseCriteria() The default constructor.

See Also