mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-01-23 21:32:04 +08:00
Update Demo
This commit is contained in:
@@ -9,23 +9,23 @@ namespace Test
|
||||
static void Main(string[] args)
|
||||
{
|
||||
JsonClient jsonToSqlClient = new JsonClient();
|
||||
//jsonToSqlClient.Context = new SqlSugarClient(new ConnectionConfig()
|
||||
//{
|
||||
// DbType = DbType.SqlServer,
|
||||
// IsAutoCloseConnection = true,
|
||||
// ConnectionString = "server=.;uid=sa;pwd=sasa;database=SQLSUGAR4XTEST"
|
||||
//});
|
||||
jsonToSqlClient.Context = new SqlSugarClient(new ConnectionConfig()
|
||||
{
|
||||
DbType = DbType.MySql,
|
||||
DbType = DbType.SqlServer,
|
||||
IsAutoCloseConnection = true,
|
||||
ConnectionString = "server=localhost;Database=SqlSugar4xTest;Uid=root;Pwd=haosql"
|
||||
}); ;
|
||||
TestHelper.InitDatabase(jsonToSqlClient);
|
||||
ConnectionString = "server=.;uid=sa;pwd=sasa;database=SQLSUGAR4XTEST"
|
||||
});
|
||||
//jsonToSqlClient.Context = new SqlSugarClient(new ConnectionConfig()
|
||||
//{
|
||||
// DbType = DbType.MySql,
|
||||
// IsAutoCloseConnection = true,
|
||||
// ConnectionString = "server=localhost;Database=SqlSugar4xTest;Uid=root;Pwd=haosql"
|
||||
//}); ;
|
||||
//TestHelper.InitDatabase(jsonToSqlClient);
|
||||
|
||||
jsonToSqlClient.Context.Aop.OnLogExecuted = (sql, p) =>
|
||||
{
|
||||
Console.WriteLine(sql);
|
||||
Console.WriteLine(UtilMethods.GetNativeSql(sql,p));
|
||||
};
|
||||
|
||||
Insetable01(jsonToSqlClient);
|
||||
@@ -44,7 +44,7 @@ namespace Test
|
||||
Updateable01(jsonToSqlClient);
|
||||
Deleteable01(jsonToSqlClient);
|
||||
|
||||
|
||||
DynamicLinq(jsonToSqlClient.Context);
|
||||
Console.WriteLine();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user