Link Search Menu Expand Document

Operation


This enum is used to set the value of the Operation property of QueryField object.

Enum Values

Below is the list of enum values.

NameDescription
Equal (Default)An equal operation.
NotEqualA not-equal operation.
LessThanA less-than operation.
GreaterThanA greater-than operation.
LessThanOrEqualA less-than-or-equal operation.
GreaterThanOrEqualA greater-than-or-equal operation.
LikeA like operation. Defines the LIKE keyword in SQL statement.
NotLikeA not-like operation. Defines the NOT LIKE keyword in SQL statement.
BetweenA between operation. Defines the BETWEEN keyword in SQL statement.
NotBetweenA not-between operation. Defines the NOT BETWEEN keyword in SQL statement.
Inan in operation. Defines the IN keyword in SQL statement.
NotInA not-in operation. Defines the NOT IN keyword in SQL statement.

Usability

Simply pass the value of when instantiating the QueryField object.

var field = new QueryField("Id", Operation.Equal, 10045);

Type of Operation

Equal

Part of the expression tree used to determine the equality of the field and data.

var result = connection.Query<Customer>(new QueryField("Id", Operation.Equal, 10045));

NotEqual

Part of the expression tree used to determine the inequality of the field and data.

var result = connection.Query<Customer>(new QueryField("Name", Operation.NotEqual, "Anna Fullerton" });

LessThan

Part of the expression tree used to determine whether the field value is less-than of the defined value.

var result = connection.Query<Customer>(new QueryField("Id", Operation.LessThan, 100 });

GreaterThan

Part of the expression tree used to determine whether the field value is greater-than of the defined value.

var result = connection.Query<Customer>(new QueryField("Id", Operation.GreaterThan, 0 });

LessThanOrEqual

Part of the expression tree used to determine whether the field value is less-than-or-equal of the defined value.

var result = connection.Query<Customer>.Query(new QueryField("Id", Operation.LessThanOrEqual, 100 });

GreaterThanOrEqual

Part of the expression tree used to determine whether the field value is greater-than-or-equal of the defined value.

var result = connection.Query<Customer>(new QueryField("Id", Operation.GreaterThanOrEqual, 0 });

Like

Part of the expression tree used to determine whether the field is identitical to a given value.

var result = connection.Query<Customer>(new QueryField("Name", Operation.Like, "Anna%" });

NotLike

Part of the expression tree used to determine whether the field is not-identitical to a given value.

var result = connection.Query<Customer>(new QueryField("Name", Operation.NotLike, "Anna%" });

Between

Part of the expression tree used to determine whether the field value is in-between the given 2 values.

var result = connection.Query<Customer>(new QueryField("Id", Operation.Between, new [] { 10045, 10075 } });

NotBetween

Part of the expression tree used to determine whether the field value is not-in-between of the given 2 values.

var result = connection.Query<Customer>(new QueryField("Id", Operation.NotBetween, new [] { 10045, 10075 } });

In

Part of the expression tree used to determine whether the field value is in the given values.

var result = connection.Query<Customer>(new QueryField("Id", Operation.In, new [] { 10045, 10046, 10047, 10048 } });

NotIn

Part of the expression tree used to determine whether the field value is not-in given values.

var result = connection.Query<Customer>(new QueryField("Id", Operation.NotIn, new [] { 10045, 10046, 10047, 10048 } });