Skip to main content

AutoFilterAttribute

Apply additional pre-configured filters to AutoQuery APIs

Assembly: ServiceStack.Interfaces.dll
View Source
Declaration
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public class AutoFilterAttribute : ScriptValueAttribute, _Attribute, IScriptValue

Properties

Term

Should this filter be applied with 'AND' or 'OR' or always filtered with 'Ensure'

View Source
Declaration
public QueryTerm Term { get; set; }

Field

The name of the DB Field to query

View Source
Declaration
public string Field { get; set; }

Operand

For Simple Filters to change Operand used in default Template, e.g. For Greater Than: Operand=">"

View Source
Declaration
public string Operand { get; set; }

Template

Use a Custom SQL Filter, Use ServiceStack.SqlTemplate for common templates, e.g: Template=SqlTemplate.IsNotNull

View Source
Declaration
public string Template { get; set; }

ValueFormat

Value modifier, e.g. implement StartsWith with 'Name LIKE {Value}', ValueFormat="{0}%"

View Source
Declaration
public string ValueFormat { get; set; }

Inherited Properties

Eval

View Source
Declaration
public string Eval { get; set; }

Expression

View Source
Declaration
public string Expression { get; set; }

NoCache

View Source
Declaration
public bool NoCache { get; set; }

Value

View Source
Declaration
public object Value { get; set; }

Implements