Table of Contents

Class DatabaseMappingAttribute

Namespace
CMS.DataEngine
Assembly
CMS.DataEngine.dll

Specifies to which database column the property maps. For simple database mappings use DatabaseFieldAttribute instead.

[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class DatabaseMappingAttribute : Attribute
Inheritance
object
Attribute
DatabaseMappingAttribute
Extension Methods

Constructors

DatabaseMappingAttribute(bool)

Constructor

public DatabaseMappingAttribute(bool executeInDb)

Parameters

executeInDb bool

If true, the member is executed on DB level, if false, then programmatically

DatabaseMappingAttribute(string)

Constructor

public DatabaseMappingAttribute(string expression)

Parameters

expression string

Expression defining the mapping of the attribute to database. Database column name or expression returning boolean value for bool properties. E.g. "NodeID" for int property or "Enabled = 1" for bool property.

Properties

ExecuteInDB

If true, the member is executed on DB level, if false, then programmatically

public bool ExecuteInDB { get; set; }

Property Value

bool

Expression

Database column name or expression returning boolean value for bool properties. E.g. "NodeID" for int property or "Enabled = 1" for bool property.

public string Expression { get; set; }

Property Value

string