This commit is contained in:
sunkaixuan 2022-12-26 15:29:20 +08:00
parent ad8851d19d
commit 96eadee09a
2 changed files with 12 additions and 0 deletions

View File

@ -133,6 +133,12 @@ namespace OrmTest
.SetColumns("name", 1) .SetColumns("name", 1)
.SetColumns("price", 1) .SetColumns("price", 1)
.Where("id=1").ExecuteCommand(); .Where("id=1").ExecuteCommand();
object o = db.Queryable<Order>().First();
db.UpdateableByObject(o).ExecuteCommand();
object os = db.Queryable<Order>().Take(2).ToList();
db.UpdateableByObject(os).ExecuteCommand();
Console.WriteLine("#### Updateable End ####"); Console.WriteLine("#### Updateable End ####");
} }

View File

@ -54,6 +54,12 @@ namespace OrmTest
db.CodeFirst.InitTables<LogicTest>(); db.CodeFirst.InitTables<LogicTest>();
; ;
db.Deleteable<LogicTest>().Where(it=>it.Id==1).IsLogic().ExecuteCommand(); db.Deleteable<LogicTest>().Where(it=>it.Id==1).IsLogic().ExecuteCommand();
object o = db.Queryable<Order>().First();
db.DeleteableByObject(o).ExecuteCommand();
object os = db.Queryable<Order>().Take(2).ToList();
db.DeleteableByObject(os).ExecuteCommand();
Console.WriteLine("#### Deleteable End ####"); Console.WriteLine("#### Deleteable End ####");
} }