Term class

Represents a term for use when adding Criteria to Criterion instances, for passing to ObjectFactory.

Namespace: ReFlex.Data.Criterion namespace
Assembly: ReFlex.Data.dll

Syntax

public class Term : IField

Constructors

Term(object value)

Remarks

The Term class is used to store a value, and then provide a rendered SQL string representation through the GetAssembledField method as used by ObjectFactory when building WHERE clauses.

For example, say you passed a DateTime object to an instance of Criterion. Criterion would create an instance of the Term class, store the DateTime value within it and add it to the Criteria list. When it comes time for ObjectFactory to render the value in to an SQL query, it calls the GetAssembledField method, passing it the IDialect instance, the Criteria that the Term instance was stored in, and any explicit table aliases. The Term class then uses the IDialect instance to return a dialect appropriate string representation of the value which is included in the query.

The Term classes behaviour at rendering time can be substituted by using the IField interface (as implemented by the Term class). You can create your own equivalent, implement IField, and pass this to the Criterion instance therefore providing a means to add different / additional functionality at render time.