mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update unit bug
This commit is contained in:
parent
888dd7681e
commit
43fd8fc3a5
@ -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\UCustom013.cs" />
|
||||
<Compile Include="UnitTest\UCustom01.cs" />
|
||||
<Compile Include="UnitTest\UCustom012.cs" />
|
||||
<Compile Include="UnitTest\UCustom09.cs" />
|
||||
|
@ -31,6 +31,7 @@ namespace OrmTest
|
||||
}
|
||||
public static void Init()
|
||||
{
|
||||
UCustom013.Init();
|
||||
UCustom012.Init();
|
||||
UCustom09.Init();
|
||||
UCustom011.Init();
|
||||
|
35
Src/Asp.Net/SqlServerTest/UnitTest/UCustom013.cs
Normal file
35
Src/Asp.Net/SqlServerTest/UnitTest/UCustom013.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OrmTest
|
||||
{
|
||||
public class UCustom013
|
||||
{
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
var db = new SqlSugarScope(new SqlSugar.ConnectionConfig()
|
||||
{
|
||||
ConnectionString = Config.ConnectionString,
|
||||
DbType = DbType.SqlServer,
|
||||
IsAutoCloseConnection = true
|
||||
});
|
||||
db.CodeFirst.InitTables<UnitBoola1>();
|
||||
db.Queryable<Order>()
|
||||
.Select(x => new
|
||||
{
|
||||
x1 = SqlFunc.Subqueryable<UnitBoola1>().Select(it => it.a)
|
||||
}).ToList();
|
||||
|
||||
}
|
||||
public class UnitBoola1
|
||||
{
|
||||
public bool a { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -552,6 +552,10 @@ namespace SqlSugar
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ((item as MethodCallExpression).Method.Name == "Select"&& item.ToString().Contains("Subqueryable()"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user