- 增加 IAdo.ConnectionString 属性返回 UseConnectionString 传入的值;

This commit is contained in:
28810
2020-03-28 15:29:39 +08:00
parent e245543c5a
commit a6eae955ed
15 changed files with 47 additions and 25 deletions

View File

@ -24,14 +24,18 @@ namespace FreeSql.Internal.CommonProvider
public IObjectPool<DbConnection> MasterPool { get; protected set; }
public List<IObjectPool<DbConnection>> SlavePools { get; } = new List<IObjectPool<DbConnection>>();
public DataType DataType { get; }
public string ConnectionString { get; }
public string[] SlaveConnectionStrings { get; }
protected CommonUtils _util { get; set; }
protected int slaveUnavailables = 0;
private object slaveLock = new object();
private Random slaveRandom = new Random();
public AdoProvider(DataType dataType)
public AdoProvider(DataType dataType, string connectionString, string[] slaveConnectionStrings)
{
this.DataType = dataType;
this.ConnectionString = connectionString;
this.SlaveConnectionStrings = slaveConnectionStrings;
}
void LoggerException(IObjectPool<DbConnection> pool, PrepareCommandResult pc, Exception ex, DateTime dt, StringBuilder logtxt, bool isThrowException = true)