Show / Hide Table of Contents

Class DalConfiguration

数据访问配置类

Inheritance
System.Object
DalConfiguration
Namespace: DapperDal
Assembly: DapperDal.dll
Syntax
public class DalConfiguration : object, IDalConfiguration

Constructors

| Improve this Doc View Source

DalConfiguration()

初始化数据访问配置

Declaration
public DalConfiguration()
| Improve this Doc View Source

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 Source

Buffered

实体集合返回前是否要缓冲(ToList)

Declaration
public bool Buffered { get; set; }
Property Value
Type Description
System.Boolean
Implements
IDalConfiguration.Buffered
| Improve this Doc View Source

DalImplementor

数据访问实现实例

Declaration
public IDalImplementor DalImplementor { get; set; }
Property Value
Type Description
IDalImplementor
Implements
IDalConfiguration.DalImplementor
| Improve this Doc View Source

Default

全局默认配置

Declaration
public static IDalConfiguration Default { get; }
Property Value
Type Description
IDalConfiguration
| Improve this Doc View Source

DefaultMapper

默认实体映射类型

Declaration
public Type DefaultMapper { get; set; }
Property Value
Type Description
Type
Implements
IDalConfiguration.DefaultMapper
| Improve this Doc View Source

Dialect

SQL方言实例

Declaration
public ISqlDialect Dialect { get; set; }
Property Value
Type Description
ISqlDialect
Implements
IDalConfiguration.Dialect
| Improve this Doc View Source

MappingAssemblies

实体映射类型检索程序集

Declaration
public IList<Assembly> MappingAssemblies { get; set; }
Property Value
Type Description
IList<Assembly>
Implements
IDalConfiguration.MappingAssemblies
| Improve this Doc View Source

Nolock

生成SQL时,是否添加 WITH (NOLOCK)

Declaration
public bool Nolock { get; set; }
Property Value
Type Description
System.Boolean
Implements
IDalConfiguration.Nolock
| Improve this Doc View Source

OutputSql

SQL输出方法

Declaration
public Action<string> OutputSql { get; set; }
Property Value
Type Description
Action<System.String>
Implements
IDalConfiguration.OutputSql

Methods

| Improve this Doc View Source

ClearCache()

清空实体映射类型缓存

Declaration
public void ClearCache()
Implements
IDalConfiguration.ClearCache()
| Improve this Doc View Source

GetMap(Type)

获取实体映射类型

Declaration
public IClassMapper GetMap(Type entityType)
Parameters
Type Name Description
Type entityType

实体类型

Returns
Type Description
IClassMapper

实体映射类型

Implements
IDalConfiguration.GetMap(Type)
| Improve this Doc View Source

GetMap<T>()

获取实体映射类型

Declaration
public IClassMapper GetMap<T>()where T : class
Returns
Type Description
IClassMapper

实体映射类型

Type Parameters
Name Description
T

实体类型

Implements
IDalConfiguration.GetMap<T>()
| Improve this Doc View Source

GetNextGuid()

获取新的GUID

Declaration
public Guid GetNextGuid()
Returns
Type Description
Guid

新的GUID

Implements
IDalConfiguration.GetNextGuid()
| Improve this Doc View Source

SetMappingAssemblies(IList<Assembly>)

设置实体映射类型检索程序集

Declaration
public void SetMappingAssemblies(IList<Assembly> assemblies)
Parameters
Type Name Description
IList<Assembly> assemblies

实体映射类型检索程序集

Implements
IDalConfiguration.SetMappingAssemblies(IList<Assembly>)

Extension Methods

SortingExtensions.ToSortable(Object)
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX