OR Map attribute in GENTLE

xiaoxiao2021-03-06  50

In the GENTLE, it is a mapping of the object to the data by customizing feature. This is indeed convenient and intuitive in use, and this feature is simple to specifically, please refer to .NET SDK Documentation. TableAttribute declares this feature in the class to persist, establish an object to the mapping relationship of the data table. Table features have three properties: Name is used to specify the data table name, given when the declaration; schema specifies the mode of the data table; CacheStrategy specifies the cache policy. TableColumnattribute Use this feature to map the properties of the object to the table of the data table, that is, establish an attribute to the mapping relationship of the data table column. Attributes of TableColumn features: Name is used to specify the column name; if NOTNULL is allowed to be empty; Size specifies the column length, and other properties Please refer to the source document. TableColumn features can be applied to properties and fields. PRIMARYTRIBUTE Use this feature to specify the property of the object's properties of the data table, this feature must be used with the TableColumn feature. PrimaryKey features only one attribute: AutoGenerated is used to specify whether the primary care is automatically generated by the database. ForeignKeyAttribute uses this feature tag attribute to reference the data in another table, which is to establish an external relationship. This feature is used to handle a pair of more and more. ForeignKey features have two properties: ForeignTable is used to specify the name of the appearance; ForeignColumn specifies the columns associated in the appearance. It is a bit strange that these two attributes are not using object names and attribute names (such should be used completely no problem)? ConcURRENCYATTRIBUTE, SoftDeleTeattribute These two features specify the number of versatile versions of the object support concurrent control, when updating, only the match line version can be updated. CustomViewAttribute This feature Specifies the properties of the object being included in a named DataView, and a property can be included in multiple named DataView simultaneously. Attributes of the CustomView feature: ViewName is used to specify the name of the DataView, note that this name is not the name of the DataView object, it is only used in the GENTLE; columnIndex specifies the location of the data in DataView; ColumnName Specifies the name of the column, this name is not data The name of the column, which refers to the name of the list of attributes in the data of DataView. Other customizers, please refer to the GENTLE document and source code. In the next article, we will use these features to create an example application.

转载请注明原文地址:https://www.9cbs.com/read-66360.html

New Post(0)