From 1e688a6318ce080ef0ba518029690a09c9630de5 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sat, 3 Jun 2023 19:36:46 +0800 Subject: [PATCH] Add demo --- Src/Asp.Net/SqlServerTest/Demo/Demo3_Insertable.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Src/Asp.Net/SqlServerTest/Demo/Demo3_Insertable.cs b/Src/Asp.Net/SqlServerTest/Demo/Demo3_Insertable.cs index 6f692fb83..d75ac3ed2 100644 --- a/Src/Asp.Net/SqlServerTest/Demo/Demo3_Insertable.cs +++ b/Src/Asp.Net/SqlServerTest/Demo/Demo3_Insertable.cs @@ -91,6 +91,11 @@ namespace OrmTest object os = db.Queryable().Take(2).ToList(); db.InsertableByObject(os).ExecuteCommand(); + + db.InsertableByObject(o).IgnoreColumns("CustomId").ExecuteCommand(); + db.InsertableByObject(o).IgnoreColumns("CustomId").ExecuteCommandAsync().GetAwaiter().GetResult(); + var id=db.InsertableByObject(o).IgnoreColumns("CustomId").ExecuteReturnIdentity(); + var id2 = db.InsertableByObject(o).IgnoreColumns("CustomId").ExecuteReturnIdentityAsync().GetAwaiter().GetResult(); db.CodeFirst.InitTables(); Console.WriteLine("#### Insertable End ####");