Class DalConfiguration
数据访问配置类
Inheritance
System.Object
DalConfiguration
Namespace: DapperDal
Assembly: DapperDal.dll
Syntax
public class DalConfiguration : object, IDalConfiguration
Constructors
| Improve this Doc View SourceDalConfiguration()
初始化数据访问配置
Declaration
public DalConfiguration()
DalConfiguration(Type, IList<Assembly>, ISqlDialect)
初始化数据访问配置
Declaration
public DalConfiguration(Type defaultMapper, IList<Assembly> mappingAssemblies, ISqlDialect sqlDialect)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | defaultMapper | 默认实体映射类型 |
| IList<Assembly> | mappingAssemblies | 实体映射类型检索程序集 |
| ISqlDialect | sqlDialect | SQL方言实例 |
Properties
| Improve this Doc View SourceBuffered
实体集合返回前是否要缓冲(ToList)
Declaration
public bool Buffered { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Implements
| Improve this Doc View SourceDalImplementor
数据访问实现实例
Declaration
public IDalImplementor DalImplementor { get; set; }
Property Value
| Type | Description |
|---|---|
| IDalImplementor |
Implements
| Improve this Doc View SourceDefault
全局默认配置
Declaration
public static IDalConfiguration Default { get; }
Property Value
| Type | Description |
|---|---|
| IDalConfiguration |
DefaultMapper
默认实体映射类型
Declaration
public Type DefaultMapper { get; set; }
Property Value
| Type | Description |
|---|---|
| Type |
Implements
| Improve this Doc View SourceDialect
SQL方言实例
Declaration
public ISqlDialect Dialect { get; set; }
Property Value
| Type | Description |
|---|---|
| ISqlDialect |
Implements
| Improve this Doc View SourceMappingAssemblies
实体映射类型检索程序集
Declaration
public IList<Assembly> MappingAssemblies { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<Assembly> |
Implements
| Improve this Doc View SourceNolock
生成SQL时,是否添加 WITH (NOLOCK)
Declaration
public bool Nolock { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Implements
| Improve this Doc View SourceOutputSql
SQL输出方法
Declaration
public Action<string> OutputSql { get; set; }
Property Value
| Type | Description |
|---|---|
| Action<System.String> |
Implements
Methods
| Improve this Doc View SourceClearCache()
清空实体映射类型缓存
Declaration
public void ClearCache()
Implements
| Improve this Doc View SourceGetMap(Type)
获取实体映射类型
Declaration
public IClassMapper GetMap(Type entityType)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | entityType | 实体类型 |
Returns
| Type | Description |
|---|---|
| IClassMapper | 实体映射类型 |
Implements
| Improve this Doc View SourceGetMap<T>()
获取实体映射类型
Declaration
public IClassMapper GetMap<T>()where T : class
Returns
| Type | Description |
|---|---|
| IClassMapper | 实体映射类型 |
Type Parameters
| Name | Description |
|---|---|
| T | 实体类型 |
Implements
| Improve this Doc View SourceGetNextGuid()
获取新的GUID
Declaration
public Guid GetNextGuid()
Returns
| Type | Description |
|---|---|
| Guid | 新的GUID |
Implements
| Improve this Doc View SourceSetMappingAssemblies(IList<Assembly>)
设置实体映射类型检索程序集
Declaration
public void SetMappingAssemblies(IList<Assembly> assemblies)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<Assembly> | assemblies | 实体映射类型检索程序集 |