mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 10:38:09 +08:00
Add unit test
This commit is contained in:
@@ -97,6 +97,7 @@
|
||||
<Compile Include="Models\OrderItem.cs" />
|
||||
<Compile Include="Demo\Demo0_SqlSugarClient.cs" />
|
||||
<Compile Include="Models\ViewOrder.cs" />
|
||||
<Compile Include="UnitTest\UnitSubToList.cs" />
|
||||
<Compile Include="UnitTest\Models\EntityBase.cs" />
|
||||
<Compile Include="UnitTest\UnitByteArray.cs" />
|
||||
<Compile Include="UnitTest\UnitInsertNavOneToOne.cs" />
|
||||
|
21
Src/Asp.Net/SqlServerTest/UnitTest/UnitSubToList.cs
Normal file
21
Src/Asp.Net/SqlServerTest/UnitTest/UnitSubToList.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace OrmTest
|
||||
{
|
||||
public class UnitSubToList
|
||||
{
|
||||
public static void Init()
|
||||
{
|
||||
var db = NewUnitTest.Db;
|
||||
var test47 = db.Queryable<Order>().Select(it => new
|
||||
{
|
||||
disCount = SqlFunc.Subqueryable<Order>().Where(s=>s.Id==it.Id).ToList()
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user