- 增加 ISelect.ToSql 字段别名设置,默认为 AsIndex,可改为 AsProperty;#158

This commit is contained in:
28810
2019-12-17 22:08:12 +08:00
parent 204b6ecd98
commit fe5b98509b
37 changed files with 309 additions and 45 deletions

View File

@ -978,6 +978,24 @@ WHERE ((((a.""id"")::varchar) in (SELECT b.""title""
select.AsTable((_, old) => old).AsTable((_, old) => old).Min(a => a.Id);
select.AsTable((_, old) => old).AsTable((_, old) => old).Sum(a => a.Id);
select.AsTable((_, old) => old).AsTable((_, old) => old).Avg(a => a.Id);
var sqlsss = select
.AsTable((type, old) => type == typeof(Topic) ? $"{old}_1" : null)
.AsTable((type, old) => type == typeof(Topic) ? $"{old}_2" : null)
.ToSql(a => new
{
a.Id,
a.Clicks
}, FieldAliasOptions.AsProperty);
var slsld3 = select
.AsTable((type, old) => type == typeof(Topic) ? $"({sqlsss})" : null)
.Page(1, 20)
.ToList(a => new
{
a.Id,
a.Clicks
});
}
public class TestInclude_OneToManyModel1