BaseExpressionAttribute class

namespace: Serenity.Data.Mapping   assemblySerenity.Net.Data

Specifies SQL expression this property corresponds to. You may use brackets ([]) to escape identifiers. Brackets will be converted to database specific quotes.

[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
public abstract class BaseExpressionAttribute : Attribute

Public Members

name description
Format { get; set; } Gets sets an optional format string to apply with {0} placeholder for the expression.
ToString(…) Converts the expression to string for specified dialect
abstract Translate(…) Gets the expression for specified dialect. Prefer ToString(ISqlDialect) version as it allows the dialect to optionally customize the formatted expression via ISqlExpressionTranslator interface.
static ToString(…) Convert the expression to string. Used by derived expression attributes to convert their constructor arguments to string while supporting other expression attribute types, or a special array with the first argument as the attribute type and others as its constructor parameters.

Protected Members

name description
BaseExpressionAttribute() The default constructor.

See Also