Skip to content

Custom Attributes

Robert Polak edited this page Jul 15, 2019 · 5 revisions

Custom Attributes

A number of Custom Attributes have been defined in the CustomAttributes.cs file. These attributes give specific directions to some APIs, classes and methods. All of the attributes assume that the method in question extends one of the BaseTemplate classes. The attributes are listed below:

LowerCase

Applied to a DTO property. This means that any input to this field will be transformed to Lower Case by the Sanitizer.

UpperCase

Applied to a DTO property. This means that any input to this field will be transformed to Upper Case by the Sanitizer.

NoTrace

Applied to an API method. By default, all API calls are traced and recorded in the database. If this attribute is asserted then that method will not leave a trace.

Analytic

Applied to an API method. If this is asserted then the API call will be recorded in the Analytic table.

CacheRead

Applied to an API method (Read methods only). If this is asserted then the Read will attempt to read a valid cache and only read the database if there is no cache. If the database is read then the cache is recreated from the read. When using this attribute the CAS_REPOSITORY property must be set in order to identify the relevant cache.

CacheFlush

Applied to an API method (Create, Update and Delete methods only). If this is asserted then the cache will be flushed at the end of a successful operation. When using this attribute the CAS_REPOSITORY property must be set in order to identify the relevant cache.

Clone this wiki locally