From 8e8ad5f362df13fea0f2f4d618888b14831c1a58 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sun, 21 May 2023 17:50:06 +0800 Subject: [PATCH] Add demo --- Src/Asp.Net/SqliteTest/Demo/Demo2_Updateable.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Src/Asp.Net/SqliteTest/Demo/Demo2_Updateable.cs b/Src/Asp.Net/SqliteTest/Demo/Demo2_Updateable.cs index 3091ab540..7c7dc258f 100644 --- a/Src/Asp.Net/SqliteTest/Demo/Demo2_Updateable.cs +++ b/Src/Asp.Net/SqliteTest/Demo/Demo2_Updateable.cs @@ -65,6 +65,16 @@ namespace OrmTest .PublicSetColumns(it => it.Price, it => it.Price + 1) .ExecuteCommand(); + var list = db.Queryable().OrderBy(it => it.Id).Take(2).ToList(); + if (list.Count >= 2) + { + list[0].Price = 10; + list[1].Price = 2; + var result69 = + db.Updateable(list) + .PublicSetColumns(it => it.Price, "+") + .ExecuteCommand(); + } /*** 2.by expression ***/