|
@ -94,6 +94,14 @@ namespace OrmTest |
|
|
.SetColumns(it => new Order { Name = "a", CreateTime = DateTime.Now }) |
|
|
.SetColumns(it => new Order { Name = "a", CreateTime = DateTime.Now }) |
|
|
.SetColumns(it => new Order() { Price = 1 }).Where(it => it.Id == 1).ExecuteCommand(); |
|
|
.SetColumns(it => new Order() { Price = 1 }).Where(it => it.Id == 1).ExecuteCommand(); |
|
|
|
|
|
|
|
|
|
|
|
Db.Updateable<Order>() |
|
|
|
|
|
.SetColumns(it => new Order { Name= it.Id>0 ?"1":"2", CreateTime = DateTime.Now }) |
|
|
|
|
|
.Where(it => it.Id == 1).ExecuteCommand(); |
|
|
|
|
|
|
|
|
|
|
|
Db.Updateable<Order>() |
|
|
|
|
|
.SetColumns(it => new Order { Name = SqlFunc.IsNull(it.Name,"a")+"b", CreateTime = DateTime.Now }) |
|
|
|
|
|
.Where(it => it.Id == 1).ExecuteCommand(); |
|
|
|
|
|
|
|
|
Db.CodeFirst.InitTables<Unitbluecopy>(); |
|
|
Db.CodeFirst.InitTables<Unitbluecopy>(); |
|
|
Db.Insertable(new Unitbluecopy()).UseSqlServer().ExecuteBlueCopy(); |
|
|
Db.Insertable(new Unitbluecopy()).UseSqlServer().ExecuteBlueCopy(); |
|
|
} |
|
|
} |
|
|