Class PropertyMap
实体属性映射器类
Inheritance
System.Object
PropertyMap
Namespace: DapperDal.Mapper
Assembly: DapperDal.dll
Syntax
public class PropertyMap : object, IPropertyMap
Constructors
| Improve this Doc View SourcePropertyMap(PropertyInfo)
初始化实体属性映射器
Declaration
public PropertyMap(PropertyInfo propertyInfo)
Parameters
Type | Name | Description |
---|---|---|
PropertyInfo | propertyInfo | 属性元数据访问器 |
Properties
| Improve this Doc View SourceColumnName
属性对应表字段名
Declaration
public string ColumnName { get; }
Property Value
Type | Description |
---|---|
System.String |
Implements
| Improve this Doc View SourceIgnored
属性是否忽略
Declaration
public bool Ignored { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Implements
| Improve this Doc View SourceIsReadOnly
属性是否只读
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Implements
| Improve this Doc View SourceKeyType
属性类型
Declaration
public KeyType KeyType { get; }
Property Value
Type | Description |
---|---|
KeyType |
Implements
| Improve this Doc View SourceName
属性名
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Implements
| Improve this Doc View SourcePropertyInfo
属性元数据访问器
Declaration
public PropertyInfo PropertyInfo { get; }
Property Value
Type | Description |
---|---|
PropertyInfo |
Implements
Methods
| Improve this Doc View SourceColumn(String)
设置实体属性和表字段的映射,支持链式调用
Declaration
public PropertyMap Column(string columnName)
Parameters
Type | Name | Description |
---|---|---|
System.String | columnName | 表字段名 |
Returns
Type | Description |
---|---|
PropertyMap | 实体属性映射器 |
Ignore()
设置实体属性忽略,支持链式调用
Declaration
public PropertyMap Ignore()
Returns
Type | Description |
---|---|
PropertyMap | 实体属性映射器 |
Key(KeyType)
设置实体属性类型,支持链式调用
Declaration
public PropertyMap Key(KeyType keyType)
Parameters
Type | Name | Description |
---|---|---|
KeyType | keyType | 属性类型 |
Returns
Type | Description |
---|---|
PropertyMap | 实体属性映射器 |
ReadOnly()
设置实体属性只读,支持链式调用
Declaration
public PropertyMap ReadOnly()
Returns
Type | Description |
---|---|
PropertyMap | 实体属性映射器 |