mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 17:48:11 +08:00
-
This commit is contained in:
@@ -33,19 +33,15 @@ namespace OrmTest.Demo
|
||||
{
|
||||
var db = GetInstance();
|
||||
var list= db.Queryable<Student>().Where(it => it.Id == 1).SingleAsync();
|
||||
list.Start();
|
||||
list.Wait();
|
||||
|
||||
var list2 = db.Queryable<Student>().SingleAsync(it => it.Id == 1);
|
||||
list2.Start();
|
||||
list2.Wait();
|
||||
|
||||
var list3= db.Queryable<Student>().Where(it => it.Id == 1).ToListAsync();
|
||||
list3.Start();
|
||||
list3.Wait();
|
||||
|
||||
var list4= db.Queryable<Student>().Where(it => it.Id == 1).ToPageListAsync(1,2);
|
||||
list4.Start();
|
||||
list4.Wait();
|
||||
}
|
||||
|
||||
|
@@ -61,7 +61,6 @@ namespace OrmTest.Demo
|
||||
|
||||
|
||||
var t12= db.Updateable<School>().AS("Student").UpdateColumns(it => new School() { Name = "jack" }).Where(it => it.Id == 1).ExecuteCommandAsync();
|
||||
t12.Start();
|
||||
t12.Wait();
|
||||
}
|
||||
}
|
||||
|
@@ -58,7 +58,6 @@ namespace OrmTest.Demo
|
||||
|
||||
|
||||
var t12 = db.Insertable(insertObj).IgnoreColumns(it => it == "Name" || it == "TestId").ExecuteReturnIdentityAsync();
|
||||
t12.Start();
|
||||
t12.Wait();
|
||||
}
|
||||
}
|
||||
|
@@ -30,7 +30,6 @@ namespace OrmTest.Demo
|
||||
var t5 = db.Deleteable<Student>().Where(it => it.Id > 1).Where(it => it.Id == 1).ExecuteCommand();
|
||||
|
||||
var t6 = db.Deleteable<Student>().AS("student").Where(it => it.Id > 1).Where(it => it.Id == 1).ExecuteCommandAsync();
|
||||
t6.Start();
|
||||
t6.Wait();
|
||||
}
|
||||
}
|
||||
|
3
Src/Asp.Net/SqlServerTest/app.config
Normal file
3
Src/Asp.Net/SqlServerTest/app.config
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
|
Reference in New Issue
Block a user