FromDefinitionDataSourceBuilder.AddAttribute

AddAttribute(string, AttributeDataType)

配置将包含要素属性信息的字段名称。

public FromDefinitionDataSourceBuilder AddAttribute(string name, AttributeDataType type)
参数类型描述
名称String属性对应的数据库字段名称。
类型AttributeDataType应将来自数据库的数据转换成的目标数据类型。

返回值

FromDefinitionDataSourceBuilder

另见


AddAttribute(string, AttributeDataType, DbType)

配置将包含要素属性信息的字段名称。

public FromDefinitionDataSourceBuilder AddAttribute(string name, AttributeDataType type, 
    DbType dbType)
参数类型描述
名称String属性对应的数据库字段名称。
类型AttributeDataType应将来自数据库的数据转换成的目标数据类型。
dbTypeDbType属性在数据库中表示的类型。如果需要保存更改,这将非常有用。

返回值

FromDefinitionDataSourceBuilder

另见