mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-25 02:09:12 +08:00
Update exp to sql
This commit is contained in:
@@ -99,6 +99,7 @@
|
||||
<Compile Include="UnitTest\Models\TestModel.cs" />
|
||||
<Compile Include="UnitTest\Models\UserEntity.cs" />
|
||||
<Compile Include="UnitTest\Models\UserRoleEntity.cs" />
|
||||
<Compile Include="UnitTest\UCustom017.cs" />
|
||||
<Compile Include="UnitTest\UCustom016.cs" />
|
||||
<Compile Include="UnitTest\UCustom015.cs" />
|
||||
<Compile Include="UnitTest\UCustom014.cs" />
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace OrmTest
|
||||
}
|
||||
public static void Init()
|
||||
{
|
||||
UCustom017.Init();
|
||||
UCustom016.Init();
|
||||
UCustom015.Init();
|
||||
UCustom014.Init();
|
||||
|
||||
24
Src/Asp.Net/SqlServerTest/UnitTest/UCustom017.cs
Normal file
24
Src/Asp.Net/SqlServerTest/UnitTest/UCustom017.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using OrmTest.UnitTest.Models;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OrmTest
|
||||
{
|
||||
public class UCustom017
|
||||
{
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
var db = NewUnitTest.Db;
|
||||
db.Queryable<Order>()
|
||||
.Where(it => it.Id==SqlFunc.Subqueryable<Order>().Where(z=>z.Id==it.Id).GroupBy(z=>z.Id).Select(x=>x.Id) )
|
||||
.ToList();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user