Browse Source

Add unit test

pull/40/head
sunkaixuan 1 year ago
parent
commit
f366762273
  1. 7
      Src/Asp.Net/SqlServerTest/UnitTest/Unitadf1131.cs

7
Src/Asp.Net/SqlServerTest/UnitTest/Unitadf1131.cs

@ -33,6 +33,13 @@ namespace OrmTest
.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"); }
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
{

Loading…
Cancel
Save