Update Updateable

This commit is contained in:
sunkaixuan
2019-04-21 20:15:07 +08:00
parent 152e779bfa
commit 599456fcda
9 changed files with 51 additions and 25 deletions

View File

@@ -66,6 +66,12 @@ namespace OrmTest.Demo
db.Updateable(updateObj).Where(true).ExecuteCommand();
db.Updateable(new Student[] { new Student() { Id=2, Name="a2" }, new Student() { Id = 1, Name = "a1" } }).ExecuteCommand();
db.Updateable(new Student[] { new Student() { Id = 2, Name = "a2" }, new Student() { Id = 1, Name = "a1" } })
.UpdateColumns(it => new { it.Name, it.Id, it.SchoolId })
.WhereColumns(it => it.Name)
.Where(it => it.Id == 1)
.ExecuteCommand();
}
}
}