Talent.DapperEx 2.0.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package Talent.DapperEx --version 2.0.0.4
NuGet\Install-Package Talent.DapperEx -Version 2.0.0.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Talent.DapperEx" Version="2.0.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Talent.DapperEx --version 2.0.0.4
#r "nuget: Talent.DapperEx, 2.0.0.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Talent.DapperEx as a Cake Addin
#addin nuget:?package=Talent.DapperEx&version=2.0.0.4

// Install Talent.DapperEx as a Cake Tool
#tool nuget:?package=Talent.DapperEx&version=2.0.0.4

DapperEx2.0内测版 帮助文档

版本记录:

当前版本2.0.0.4,时间 2017.12.8 变更: 1、BaseBusiness类增加新方法:TransactionSql(IDictionary<string, object> sqllist) 用于进行事务处理执行自定义sql语句,Dic中key为sql语句,value为参数。 ---------------------------------------------------------分割线-------------------------------------------------------------

当前版本2.0.0.3,时间 2017.12.1 变更: 1、分页查询返回总数的数据类型由long 变更为 int 2、新增方法: CustomQuery<T>(string customSql, SqlQuery sqlQuery = null, string customColumn = null) CustomQueryByPage<T>(string customSql, int pageIndex, int pageSize, out int dataCount, SqlQuery sqlQuery = null, string customColumn = null) 3、SqlQuery类新增方法: SetIgProperties(IList properties) 设置忽略更新的属性 4、BaseBusiness新增: UpdateValid<T>(T t, IList<string> validProperties, SqlQuery sql = null) 通过validProperties 设置T中可更新列 ---------------------------------------------------------分割线-------------------------------------------------------------

版本记录: 当前版本2.0.0.2,时间 2017.11.28 变更: 1、修复了分页查询返回数据总数错误的BUG。 2、修复了Delete方法传入SqlQuery会被当做泛型类型的问题。

---------------------------------------------------------分割线-------------------------------------------------------------

当前版本2.0.0.1,时间 2017.11.27 变更: 1、添加了DynamicBusiness类,与DynamicSelectColumsModel类相关的方法都移入了这个类文件。 2、在BaseBusiness类中移除了原本与Dynamic 相关的方法。 3、BaseBusiness类中添加了 UpdateBatch和DeleteBatch方法,但是性能不是很高,慎用。

---------------------------------------------------------分割线------------------------------------------------------------- 版本记录: 当前版本2.0,时间 2017.11.24

变更: 1、命名空间变更:DapperEX变更为 Talent.DapperEx,Talent取人才之义。 2、项目不需再引用Dapper源码,DappEx中已通过nuget引用了Dapper的官方最新版。 3、.net framework的版本为4.5,如引用该框架,客户端框架版本应>=4.5 4、原Common类库下的Attribute文件夹迁入了DapperEx下,因为都是对数据库操作的扩展,这样比较符合业务,减少冗余引用。 ---------------------------------------------------------分割线------------------------------------------------------------- 正文: 一、BaseBusiness类 1、BaseBusiness类中的connectionName 已经被移除了。

2、UpdateBatch已经被移除了。 3、DeleteBatch也被移除了,以后请使用下面的方法进行批量删除。 4、与事务相关的一些自定义方法都被移除了,取而代之的是

5、旧版本中,Insert、Update等方法都可以传入translation参数,现在都已移除。 移除原因:只是样子货,并不能实现真正的事务处理,请用Transaction方法实现事务操作。

二、DbBase类 1、这个类现在限定只能在DapperEx程序集中使用,已经不能在外部进行实例化了,因为已经不需要~~ 2、关于数据库的指定

在Web.config文件的appSettings 节点下面添加 DBConnectionName,这里可以随意指定,但是要对应ConnectionStrings的相关设置如下:

其中providerName指定数据库对应的驱动类型,SqlServer数据库请设置为“System.Data.SqlClient”。 3、目前不支持多数据库连接,后续根据需求看是否开放。 4、目前只支持SqlServer数据库,MySql和higodb的支持已经列入计划。

三、SqlQuery类

1、Top(int top) 设置取前N条数据 2、AppendParam<T>(T t) 追加参数 AppendParam(string field, object value)逐个追加参数 3、SetPage(int pindex, int pageSize) 设置分页条件 4、SetExcProperties<T>(IList<string> properties) 设置执行的属性列,主要用在Update时 5、Builder()实例化SqlQuery 6、OrderBy(Expression<Func<T, object>> expr, bool desc) 7、LeftInclude(bool isAnd = true)添加左括号 8、RightInclude()添加右括号 9、AndWhere(Expression<Func<T, object>> expr, OperationMethod operation, object value) 添加and条件 10、OrWhere(Expression<Func<T, object>> expr, OperationMethod operation, object value) 添加Or条件 11、Where(Expression<Func<T, object>> expr, OperationMethod operation, object value) 添加where条件 12、SetColums(string str)设置查询列 13、SqlQuery<T> Select()指定为查询语句 14、SqlQuery<T> Insert()指定为Insert语句 15、public SqlQuery<T> Update()指定为Update语句 16、SqlQuery<T> Delete()指定为Delete语句 17、SqlQuery<T> Count()指定为Count语句 18、SqlQuery<T> Page()指定为Page语句

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.1.2 1,133 1/30/2018
2.1.1.1 1,014 1/24/2018
2.1.1 878 1/19/2018
2.0.1.1 984 12/17/2017
2.0.1 1,107 12/16/2017
2.0.0.4 938 12/8/2017
2.0.0.3 923 12/1/2017
2.0.0.2 909 11/28/2017
2.0.0.1 881 11/27/2017

first publish