mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-16 16:50:41 +08:00
Add unit test
This commit is contained in:
parent
7da9eacdf2
commit
e4c430154f
@ -29,7 +29,23 @@ namespace OrmTest
|
|||||||
TemplateFileName="a"
|
TemplateFileName="a"
|
||||||
}).ExecuteCommand();
|
}).ExecuteCommand();
|
||||||
var list=db.Queryable<PmtSetting>().Includes(x => x.Template).ToList();
|
var list=db.Queryable<PmtSetting>().Includes(x => x.Template).ToList();
|
||||||
|
var sql=db.Queryable<Unitadfaasdfasfa>()
|
||||||
|
.Where(it => it.num == SqlFunc.Subqueryable<UnitadfaasdfasfaDTO>().GroupBy(s => s.num).Select(s => s.num))
|
||||||
|
.ToSqlString();
|
||||||
|
if (!sql.Contains("[num] in")) { throw new Exception("unit error"); }
|
||||||
}
|
}
|
||||||
|
public class Unitadfaasdfasfa
|
||||||
|
{
|
||||||
|
public string Id { get; set; }
|
||||||
|
public long num { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class UnitadfaasdfasfaDTO
|
||||||
|
{
|
||||||
|
public string Id { get; set; }
|
||||||
|
public long? num { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
// 主表
|
// 主表
|
||||||
public class PmtSetting
|
public class PmtSetting
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user