Built-In Attributes
- 3 minutes to read
Built-in attributes allow you to provide detailed mapping information to XPO for .NET and thus address any business requirement. The table below lists all the attributes provided by XPO.
Attribute | Description |
---|---|
AggregatedAttribute | Indicates that persistent objects referenced by the target property are aggregated. |
AssociationAttribute | Identifies the end of an association that is involved in an object relationship. |
ColumnDbDefaultValueAttribute | Applied to persistent class’ fields or properties. Specifies the SQL expression representing the default value of the database column mapped to the target property/field. |
ColumnDefaultValueAttribute | Applied to persistent class’ fields or properties. Specifies the default value of the database column mapped to the target property/field. |
CustomAttribute | Specifies a custom attribute for a class or a class member. |
DbTypeAttribute | Specifies the database type of the column that a property is mapped to. |
DefaultMembersPersistence | Lists the values that determine which members are implied as persistent by default. |
DeferredDeletionAttribute | Enables deferred object deletion. |
DelayedAttribute | Indicates that the property’s value should not be loaded when a persistent object is being loaded. The property will be loaded the first time it is accessed. |
DisplayNameAttribute | Specifies the member’s display name. |
ExplicitLoadingAttribute | Specifies that the information used to retrieve persistent objects that are referenced by the current property, is included in a query used to load this property. |
IndexedAttribute | Indicates that a property or field participates in index creation. |
IndicesAttribute | Specifies the properties that participate in creation of non-unique database indices. |
KeyAttribute | Indicates that a property or a field is a key. |
MapInheritanceAttribute | Specifies the type of object-relational inheritance mapping for the class. |
MemberDesignTimeVisibilityAttribute | Specifies whether a property or class is visible at design time. |
NoForeignKeyAttribute | Disables automatic creation of the FOREIGN KEY constraints. |
NonPersistentAttribute | Indicates that a class, property, or field will not be stored in a persistent data store. |
NullableAttribute | Applies to persistent class’ fields or properties. Specifies if a nullable column should be created when updating the database schema for the target property/field. |
NullableBehaviorAttribute | Applied to persistent classes. Specifies if nullable columns should be created when updating the database schema for the target class. |
NullValueAttribute | Associates a constant with the null value of a property or a field of a simple type. |
OptimisticLockingAttribute | Specifies that a persistent object’s state can be locked during a session. |
PersistentAliasAttribute | Indicates that a property is not persistent and its value is calculated based upon the values of a specific field(s). |
PersistentAttribute | Indicates that a property, field or class will be stored in a persistent data store and specifies the target column or table name. |
SizeAttribute | Specifies the maximum number of characters that can be stored in a column which is created to store the data of a property or field. |
ValueConverterAttribute | Specifies that a property is made persistent using a Value Converter. |