mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Add demo
This commit is contained in:
parent
9efde36f3b
commit
05cabec728
@ -55,12 +55,18 @@ namespace OrmTest
|
||||
{
|
||||
names = SqlFunc.Subqueryable<Order>().Where(z => z.Id == it.Id).SelectStringJoin(z => z.Name, ",")
|
||||
})
|
||||
.ToList();
|
||||
.ToList();
|
||||
var test08 = db.Queryable<Order>().Select(it => new
|
||||
{
|
||||
names = $"as{it.Id}fd{it.Id}a"
|
||||
})
|
||||
.ToList();
|
||||
.ToList();
|
||||
db.CodeFirst.InitTables<BoolTest>();
|
||||
db.Queryable<BoolTest>().OrderBy(it => it.bb ).ToList();
|
||||
db.Queryable<BoolTest>().OrderByDescending(it => it.bb).ToList();
|
||||
db.Queryable<BoolTest>().OrderBy(it => new { it.bb }).ToList();
|
||||
db.Queryable<BoolTest>().OrderBy(it => new { x=SqlFunc.Desc(it.bb) }).ToList();
|
||||
db.Queryable<BoolTest>().OrderByDescending(it => new { it.bb }).ToList();
|
||||
Console.WriteLine("#### Examples End ####");
|
||||
}
|
||||
|
||||
|
13
Src/Asp.Net/SqliteTest/Models/BoolTest.cs
Normal file
13
Src/Asp.Net/SqliteTest/Models/BoolTest.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OrmTest
|
||||
{
|
||||
public class BoolTest
|
||||
{
|
||||
public bool bb { get; set; }
|
||||
}
|
||||
}
|
@ -67,6 +67,7 @@
|
||||
<Compile Include="Demo\DemoJ_Report.cs" />
|
||||
<Compile Include="Demo\DemoN_SplitTable.cs" />
|
||||
<Compile Include="Models\AttributeTable.cs" />
|
||||
<Compile Include="Models\BoolTest.cs" />
|
||||
<Compile Include="Models\CarType.cs" />
|
||||
<Compile Include="Models\Custom.cs" />
|
||||
<Compile Include="Models\EntityMapper.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user