From b4b9f7e28ac387953fd4f88c3681de4f681f2fcf Mon Sep 17 00:00:00 2001 From: sunkaixuna <610262374@qq.com> Date: Tue, 26 Oct 2021 21:20:30 +0800 Subject: [PATCH] Update demo --- Src/Asp.Net/DmTest/UnitTest/UThread.cs | 1 - Src/Asp.Net/MySqlTest/UnitTest/UThread.cs | 1 - Src/Asp.Net/OracleTest/Demo/Demo1_Queryable.cs | 1 + Src/Asp.Net/OracleTest/UnitTest/UThread.cs | 1 - Src/Asp.Net/PgSqlTest/UnitTest/UThread.cs | 3 +-- Src/Asp.Net/SqliteTest/UnitTest/UThread.cs | 3 +-- 6 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Src/Asp.Net/DmTest/UnitTest/UThread.cs b/Src/Asp.Net/DmTest/UnitTest/UThread.cs index 76b653667..44a44d367 100644 --- a/Src/Asp.Net/DmTest/UnitTest/UThread.cs +++ b/Src/Asp.Net/DmTest/UnitTest/UThread.cs @@ -31,7 +31,6 @@ namespace OrmTest ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, - IsShardSameThread = true, AopEvents = new AopEvents { OnLogExecuting = (sql, p) => diff --git a/Src/Asp.Net/MySqlTest/UnitTest/UThread.cs b/Src/Asp.Net/MySqlTest/UnitTest/UThread.cs index 8b7068a38..295df020c 100644 --- a/Src/Asp.Net/MySqlTest/UnitTest/UThread.cs +++ b/Src/Asp.Net/MySqlTest/UnitTest/UThread.cs @@ -31,7 +31,6 @@ namespace OrmTest ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, - IsShardSameThread = true, AopEvents = new AopEvents { OnLogExecuting = (sql, p) => diff --git a/Src/Asp.Net/OracleTest/Demo/Demo1_Queryable.cs b/Src/Asp.Net/OracleTest/Demo/Demo1_Queryable.cs index 2644890a5..546468ff8 100644 --- a/Src/Asp.Net/OracleTest/Demo/Demo1_Queryable.cs +++ b/Src/Asp.Net/OracleTest/Demo/Demo1_Queryable.cs @@ -51,6 +51,7 @@ namespace OrmTest CustomName = SqlFunc.MergeString(it.Name, "/", it.Name) }) ).ToList(); + var test2 = db.Queryable().Select().ToList(); Console.WriteLine("#### Examples End ####"); } diff --git a/Src/Asp.Net/OracleTest/UnitTest/UThread.cs b/Src/Asp.Net/OracleTest/UnitTest/UThread.cs index 9ab5dc6f6..a555d32f0 100644 --- a/Src/Asp.Net/OracleTest/UnitTest/UThread.cs +++ b/Src/Asp.Net/OracleTest/UnitTest/UThread.cs @@ -31,7 +31,6 @@ namespace OrmTest ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, - IsShardSameThread = true, AopEvents = new AopEvents { OnLogExecuting = (sql, p) => diff --git a/Src/Asp.Net/PgSqlTest/UnitTest/UThread.cs b/Src/Asp.Net/PgSqlTest/UnitTest/UThread.cs index 53998c258..4efa6b87a 100644 --- a/Src/Asp.Net/PgSqlTest/UnitTest/UThread.cs +++ b/Src/Asp.Net/PgSqlTest/UnitTest/UThread.cs @@ -25,13 +25,12 @@ namespace OrmTest } } }); - public static SqlSugarClient ssDb => new SqlSugarClient(new ConnectionConfig() + public static SqlSugarScope ssDb => new SqlSugarScope(new ConnectionConfig() { DbType = DbType.PostgreSQL, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, - IsShardSameThread = true, AopEvents = new AopEvents { OnLogExecuting = (sql, p) => diff --git a/Src/Asp.Net/SqliteTest/UnitTest/UThread.cs b/Src/Asp.Net/SqliteTest/UnitTest/UThread.cs index 52d7aab58..64cfd4af7 100644 --- a/Src/Asp.Net/SqliteTest/UnitTest/UThread.cs +++ b/Src/Asp.Net/SqliteTest/UnitTest/UThread.cs @@ -25,13 +25,12 @@ namespace OrmTest } } }); - public static SqlSugarClient ssDb => new SqlSugarClient(new ConnectionConfig() + public static SqlSugarScope ssDb => new SqlSugarScope(new ConnectionConfig() { DbType = DbType.Sqlite, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, - IsShardSameThread = true, AopEvents = new AopEvents { OnLogExecuting = (sql, p) =>