Update join

This commit is contained in:
sunkaixuan
2023-04-24 15:29:37 +08:00
parent b5bac8a4a7
commit 71e2bd79b3
3 changed files with 11 additions and 6 deletions

View File

@@ -66,9 +66,11 @@ namespace OrmTest
var result8 = db.Updateable<Order>(it => it.Name == "Name" + "1").Where(it => it.Id == 1).ExecuteCommand();
var result81 = db.Updateable<Order>().SetColumns(it => it.Name == "Name" + "1").Where(it => it.Id == 1).ExecuteCommand();
//
var result61 = db.Updateable<Order>()
.InnerJoin<Custom>((x, y) => x.CustomId == y.Id)
.SetColumns((x, y) => new Order() { Name = y.Name, Price=y.Id })
.Where((x, y) => x.Id == 1)
.ExecuteCommand();
/*** 3.by Dictionary ***/
var dt = new Dictionary<string, object>();