From 5cdb0cceff2676547301eae93dec4db885aae025 Mon Sep 17 00:00:00 2001 From: sunkaixuna <610262374@qq.com> Date: Tue, 23 Nov 2021 18:30:52 +0800 Subject: [PATCH] Update unit --- Src/Asp.Net/SqlServerTest/UnitTest/UFastest.cs | 7 +++---- Src/Asp.Net/SqlServerTest/UnitTest/USplit.cs | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UFastest.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UFastest.cs index c4b2633bf..4527b3cc2 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UFastest.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UFastest.cs @@ -13,7 +13,7 @@ namespace OrmTest var db = new SqlSugarScope(new SqlSugar.ConnectionConfig() { ConnectionString =Config.ConnectionString, - DbType = DbType.PostgreSQL, + DbType = DbType.SqlServer, IsAutoCloseConnection = true }); @@ -41,13 +41,12 @@ namespace OrmTest db.Fastest().BulkUpdate(updateList); Console.WriteLine("用例跑完"); - Console.ReadKey(); } - [SugarTable("UnitFastest001a")] + [SugarTable("UnitFastest0011a")] public class Test2 { - [SugarColumn(IsNullable = false, IsPrimaryKey = true)] + [SugarColumn(IsNullable = false,IsIdentity =true, IsPrimaryKey = true)] public int id { get; set; } [SugarColumn(IsNullable = false)] diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/USplit.cs b/Src/Asp.Net/SqlServerTest/UnitTest/USplit.cs index 21a1f0e33..1288d269c 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/USplit.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/USplit.cs @@ -87,6 +87,8 @@ namespace OrmTest }).SplitTable().ExecuteReturnSnowflakeId(); //只查A表 + var tableName2 = db.SplitHelper(new WordTestTable() { Name="A" }).GetTableNames(); + var listall1 = db.Queryable().Where(it => it.Name == "all").SplitTable(tas => tas.InTableNames(tableName2)).ToList(); var listall = db.Queryable().Where(it => it.Name == "all").SplitTable(tas => tas.ContainsTableNames("_FirstA")).ToList(); }