|
|
@ -32,14 +32,9 @@ namespace OrmTest |
|
|
|
|
|
|
|
|
|
|
|
//insert or update
|
|
|
|
db.Saveable<Order>(new Order() { Id=1, Name="jack" }).ExecuteReturnEntity(); |
|
|
|
db.Storageable<Order>(new Order() { Id=1, Name="jack" }).ExecuteCommand(); |
|
|
|
|
|
|
|
|
|
|
|
//insert or update
|
|
|
|
db.Saveable<Order>(new Order() { Id = 1000, Name = "jack", CreateTime=DateTime.Now }) |
|
|
|
.InsertColumns(it => new { it.Name,it.CreateTime, it.Price})//if insert into name,CreateTime,Price
|
|
|
|
.UpdateColumns(it => new { it.Name, it.CreateTime })//if update set name CreateTime
|
|
|
|
.ExecuteReturnEntity(); |
|
|
|
|
|
|
|
|
|
|
|
Console.WriteLine(""); |
|
|
|
Console.WriteLine("#### Saveable End ####"); |
|
|
|