mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
同步代码
This commit is contained in:
parent
b5956d5271
commit
3b2e2664bb
@ -82,6 +82,22 @@ namespace OrmTest
|
||||
var ts = list.First().ts;
|
||||
var de = DateTime.Now.AddYears(-1);
|
||||
var count = db.Deleteable<MyTable02>().Where(it => it.ts > de).ExecuteCommand();
|
||||
|
||||
|
||||
//异步
|
||||
db.Insertable(new MyTable02()
|
||||
{
|
||||
ts = DateTime.Now,
|
||||
current = Convert.ToSingle(1.1),
|
||||
groupId = 1,
|
||||
isdelete = true,
|
||||
name = "haha",
|
||||
location = "aa",
|
||||
phase = Convert.ToSingle(1.2),
|
||||
voltage = 11
|
||||
}).ExecuteCommandAsync().GetAwaiter().GetResult();
|
||||
|
||||
var list100 = db.Queryable<MyTable02>().ToListAsync().GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
private static List<MyTable02> GetInsertDatas()
|
||||
|
Loading…
Reference in New Issue
Block a user