EnumerationAttribute Class
Specifies how an enumerated type value is stored in the database.
Remarks
Apply this attribute directly above the enumerated type declaration (not on a field or property). Use TEnumMappingType.emInteger to store ordinal values, TEnumMappingType.emString to store the name of each enumerated value, or TEnumMappingType.emChar to store a single uppercase character per value.
When using emChar or emString, supply the comma-separated mapped values in the same order as the enumerated type values.
Syntax
Unit: Aurelius.Mapping.Attributes
EnumerationAttribute = class(TCustomAttribute);
Constructors
| Name | Description |
|---|---|
| Create | Overloaded Create(TEnumMappingType) Create(TEnumMappingType, string) |
Properties
| Name | Description |
|---|---|
| MappedType | Gets or sets the storage type used for enumerated values in the database. |
| MappedValues | Gets or sets the list of database values mapped to each enumerated constant. |