mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Update unit test
This commit is contained in:
parent
eaf297edc0
commit
2d5f95c167
@ -10,7 +10,7 @@ namespace OrmTest
|
||||
public partial class NewUnitTest
|
||||
{
|
||||
|
||||
public static SqlSugarClient simpleDb => new SqlSugarClient(new ConnectionConfig()
|
||||
public static SqlSugarScope simpleDb => new SqlSugarScope(new ConnectionConfig()
|
||||
{
|
||||
DbType = DbType.SqlServer,
|
||||
ConnectionString = Config.ConnectionString,
|
||||
@ -25,13 +25,12 @@ namespace OrmTest
|
||||
}
|
||||
}
|
||||
});
|
||||
public static SqlSugarClient ssDb => new SqlSugarClient(new ConnectionConfig()
|
||||
public static ConnectionConfig Config = new ConnectionConfig()
|
||||
{
|
||||
DbType = DbType.SqlServer,
|
||||
ConnectionString = Config.ConnectionString,
|
||||
ConnectionString = "server=.;uid=sa;pwd=sasa;database=SQLSUGAR4XTEST",
|
||||
InitKeyType = InitKeyType.Attribute,
|
||||
IsAutoCloseConnection = true,
|
||||
IsShardSameThread = true,
|
||||
AopEvents = new AopEvents
|
||||
{
|
||||
OnLogExecuting = (sql, p) =>
|
||||
@ -40,8 +39,10 @@ namespace OrmTest
|
||||
Console.WriteLine(string.Join(",", p?.Select(it => it.ParameterName + ":" + it.Value)));
|
||||
}
|
||||
}
|
||||
});
|
||||
public static SqlSugarClient singleDb = new SqlSugarClient(new ConnectionConfig()
|
||||
};
|
||||
|
||||
public static SqlSugarScope ssDb => new SqlSugarScope(Config);
|
||||
public static SqlSugarScope singleDb = new SqlSugarScope(new ConnectionConfig()
|
||||
{
|
||||
DbType = DbType.SqlServer,
|
||||
ConnectionString = Config.ConnectionString,
|
||||
@ -56,13 +57,12 @@ namespace OrmTest
|
||||
}
|
||||
}
|
||||
});
|
||||
public static SqlSugarClient singleAndSsDb = new SqlSugarClient(new ConnectionConfig()
|
||||
public static SqlSugarScope singleAndSsDb = new SqlSugarScope(new ConnectionConfig()
|
||||
{
|
||||
DbType = DbType.SqlServer,
|
||||
ConnectionString = Config.ConnectionString,
|
||||
InitKeyType = InitKeyType.Attribute,
|
||||
IsAutoCloseConnection = true,
|
||||
IsShardSameThread = true,
|
||||
AopEvents = new AopEvents
|
||||
{
|
||||
OnLogExecuting = (sql, p) =>
|
||||
|
Loading…
Reference in New Issue
Block a user