- 优化 FreeSql.Extensions.Linq Select 选定字段查询方法;#674 #533

This commit is contained in:
2881099
2021-02-02 13:07:01 +08:00
parent ef4cf46556
commit 56d2128726
3 changed files with 27 additions and 2 deletions

View File

@ -24,6 +24,12 @@ namespace FreeSql.Tests
Assert.Equal(@"SELECT count(distinct a.""status"") as1
FROM ""ts_up_dywhere01"" a", sql);
sql = fsql.Select<ts_up_dywhere01>().Select(a => new { a.status }).Distinct().ToSql();
fsql.Select<ts_up_dywhere01>().Select(a => new { a.status }).Distinct().Count(out count);
Assert.Equal(@"SELECT DISTINCT a.""status"" as1
FROM ""ts_up_dywhere01"" a", sql);
}
[Fact]