From c4cfdf0a108caeb73fc0c0066560f7b57272df2a Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Tue, 26 Mar 2024 09:00:34 +0800 Subject: [PATCH] Add user test case --- Src/Asp.Net/PgSqlTest/PgSqlTest.csproj | 1 + .../PgSqlTest/UserTestCases/UnitTest/Main.cs | 1 + .../UserTestCases/UnitTest/UnitDataTable.cs | 25 +++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 Src/Asp.Net/PgSqlTest/UserTestCases/UnitTest/UnitDataTable.cs diff --git a/Src/Asp.Net/PgSqlTest/PgSqlTest.csproj b/Src/Asp.Net/PgSqlTest/PgSqlTest.csproj index bdc807093..964523986 100644 --- a/Src/Asp.Net/PgSqlTest/PgSqlTest.csproj +++ b/Src/Asp.Net/PgSqlTest/PgSqlTest.csproj @@ -136,6 +136,7 @@ + diff --git a/Src/Asp.Net/PgSqlTest/UserTestCases/UnitTest/Main.cs b/Src/Asp.Net/PgSqlTest/UserTestCases/UnitTest/Main.cs index 15dc2ec3d..ea32d7e25 100644 --- a/Src/Asp.Net/PgSqlTest/UserTestCases/UnitTest/Main.cs +++ b/Src/Asp.Net/PgSqlTest/UserTestCases/UnitTest/Main.cs @@ -31,6 +31,7 @@ namespace OrmTest } public static void Init() { + UnitDataTable.Init(); UnitAny.Init(); Unitadfafafasd.Init(); UintOneToOneDto.Init(); diff --git a/Src/Asp.Net/PgSqlTest/UserTestCases/UnitTest/UnitDataTable.cs b/Src/Asp.Net/PgSqlTest/UserTestCases/UnitTest/UnitDataTable.cs new file mode 100644 index 000000000..26cef2c04 --- /dev/null +++ b/Src/Asp.Net/PgSqlTest/UserTestCases/UnitTest/UnitDataTable.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OrmTest +{ + internal class UnitDataTable + { + public static void Init() + { + var db = NewUnitTest.Db; + db.CodeFirst.InitTables(); + var list=new List() { new Unitadfadsfa() { Id=Guid.NewGuid(), Name="a" }, + new Unitadfadsfa() { Id=Guid.NewGuid(),Name="a" }}; + db.Storageable(list).WhereColumns(it => it.Id).ExecuteCommand(); + } + } + public class Unitadfadsfa + { + public Guid Id { get; set; } + public string Name { get; set; } + } +}