Model Property Attributes
.NET Standard 2.x
The list of attributes that can be applied to the property of a model class.
Namespace: SnapObjects.Data
Assembly: SnapObjects.Data.dll
Classes
Name | Description |
---|---|
ColumnAttribute (.NET Class) | Represents the database column that a property is mapped to. |
ConcurrencyCheckAttribute (.NET Class) | Specifies that a property participates in optimistic concurrency checks. |
DatabaseGeneratedAttribute (.NET Class) | Specifies how the database generates values for a property. |
DefaultValueAttribute (.NET Class) | Specifies the default value for a property. |
EmailAddressAttribute (.NET Class) | Validates an email address. |
IdentityAttribute | Specifies that the database generates a value for the property when a row is inserted. |
KeyAttribute (.NET Class) | Denotes one or more properties that uniquely identify an entity. |
MaxLengthAttribute (.NET Class) | Specifies the maximum length of array or string data allowed in a property. |
MinLengthAttribute (.NET Class) | Specifies the minimum length of array or string data allowed in a property. |
ModelEmbeddedAttribute | Specifies that a property in the model class will use the specified model class to load and update data independently. |
NotMappedAttribute (.NET Class) | Denotes that a property or class should be excluded from database mapping. |
PhoneAttribute (.NET Class) | Specifies that a data field value is a well-formed phone number. |
PropertySaveAttribute | Specifies the strategy to be used when saving the data for a property to the database. |
RequiredAttribute (.NET Class) | Specifies that a data field value is required. |
SetValueAttribute | Specifies that when there is an insert or update operation in the master model, set the property value of the master model to the associate property of the detail model |
SqlColumnAttribute | Represents the database column that a property is mapped to. |
SqlComputeAttribute | Represents a computed column that a property is mapped to. |
SqlDefaultValueAttribute | Specifies that the database will generate a default value for the mapped column when saving data for a property to the database. |
SqlEmbeddedAttribute | Specifies that a property of the model class will use the specified raw SQL SELECT statement to load data. |
StringLengthAttribute (.NET Class) | Specifies the minimum and maximum length of characters that are allowed in a data field. |
UrlAttribute (.NET Class) | Provides URL validation. |