mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update demo
This commit is contained in:
parent
8bd3647322
commit
8d802052c0
@ -7,8 +7,7 @@ namespace OrmTest
|
|||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
UnitStringToExp.Init();
|
|
||||||
//Each example will automatically create a table and can run independently.
|
//Each example will automatically create a table and can run independently.
|
||||||
//每个例子都会自动建表 并且可以独立运行
|
//每个例子都会自动建表 并且可以独立运行
|
||||||
_1_CodeFirst.Init();
|
_1_CodeFirst.Init();
|
||||||
|
@ -64,7 +64,37 @@ namespace OrmTest
|
|||||||
" {0} as id",
|
" {0} as id",
|
||||||
" it.Name as Name" }
|
" it.Name as Name" }
|
||||||
, 10)
|
, 10)
|
||||||
.InSingleAsync(1).GetAwaiter().GetResult();
|
.First();
|
||||||
|
|
||||||
|
var userInfo6 = db.Queryable<Order>()
|
||||||
|
.In(1)
|
||||||
|
.Select("it",
|
||||||
|
new List<string>()
|
||||||
|
{ "it.Id as userId",
|
||||||
|
" {0} as id",
|
||||||
|
" it.Name as Name" }
|
||||||
|
, 10)
|
||||||
|
.Single();
|
||||||
|
|
||||||
|
|
||||||
|
var userInfo7 = db.Queryable<Order>()
|
||||||
|
.Select("it",
|
||||||
|
new List<string>()
|
||||||
|
{ "it.Id as userId",
|
||||||
|
" {0} as id",
|
||||||
|
" it.Name as Name" }
|
||||||
|
, 10)
|
||||||
|
.FirstAsync().GetAwaiter().GetResult();
|
||||||
|
|
||||||
|
var userInfo8 = db.Queryable<Order>()
|
||||||
|
.In(1)
|
||||||
|
.Select("it",
|
||||||
|
new List<string>()
|
||||||
|
{ "it.Id as userId",
|
||||||
|
" {0} as id",
|
||||||
|
" it.Name as Name" }
|
||||||
|
, 10)
|
||||||
|
.SingleAsync().GetAwaiter().GetResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Test03()
|
private static void Test03()
|
||||||
|
Loading…
Reference in New Issue
Block a user