mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 23:13:42 +08:00
Add unit test
This commit is contained in:
parent
11ecb3aade
commit
f366762273
@ -33,6 +33,13 @@ namespace OrmTest
|
|||||||
.Where(it => it.num == SqlFunc.Subqueryable<UnitadfaasdfasfaDTO>().GroupBy(s => s.num).Select(s => s.num))
|
.Where(it => it.num == SqlFunc.Subqueryable<UnitadfaasdfasfaDTO>().GroupBy(s => s.num).Select(s => s.num))
|
||||||
.ToSqlString();
|
.ToSqlString();
|
||||||
if (!sql.Contains("[num] in")) { throw new Exception("unit error"); }
|
if (!sql.Contains("[num] in")) { throw new Exception("unit error"); }
|
||||||
|
|
||||||
|
db.CodeFirst.InitTables<Unitadfaasdfasfa, UnitadfaasdfasfaDTO>();
|
||||||
|
var sql2 = db.Queryable<Unitadfaasdfasfa>()
|
||||||
|
.Where(
|
||||||
|
it => it.num == SqlFunc.Subqueryable<UnitadfaasdfasfaDTO>().GroupBy(s => s.num).Select(s => s.num)
|
||||||
|
&& it.num == SqlFunc.Subqueryable<UnitadfaasdfasfaDTO>().GroupBy(s => s.num).Select(s => s.num))
|
||||||
|
.ToList();
|
||||||
}
|
}
|
||||||
public class Unitadfaasdfasfa
|
public class Unitadfaasdfasfa
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user