- 增加 Where In 表达式解析;

- 增加 FreeSqlBuilder.UseConnectionFactory 自定义数据库连接对象的创建方法;
This commit is contained in:
28810
2019-12-17 01:39:53 +08:00
parent 51494c31a2
commit e1e3e4a3b2
57 changed files with 1018 additions and 492 deletions

View File

@ -4,6 +4,7 @@ using FreeSql.SqlServer.Curd;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Threading;
namespace FreeSql.SqlServer
@ -28,12 +29,12 @@ namespace FreeSql.SqlServer
public IAop Aop { get; }
public ICodeFirst CodeFirst { get; }
public IDbFirst DbFirst { get; }
public SqlServerProvider(string masterConnectionString, string[] slaveConnectionString)
public SqlServerProvider(string masterConnectionString, string[] slaveConnectionString, Func<DbConnection> connectionFactory = null)
{
this.InternalCommonUtils = new SqlServerUtils(this);
this.InternalCommonExpression = new SqlServerExpression(this.InternalCommonUtils);
this.Ado = new SqlServerAdo(this.InternalCommonUtils, masterConnectionString, slaveConnectionString);
this.Ado = new SqlServerAdo(this.InternalCommonUtils, masterConnectionString, slaveConnectionString, connectionFactory);
this.Aop = new AopProvider();
this.DbFirst = new SqlServerDbFirst(this, this.InternalCommonUtils, this.InternalCommonExpression);