mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 修改 SqlExt PartitionBy 无法传入多列的问题;
This commit is contained in:
@ -224,11 +224,13 @@ namespace FreeSql.Tests
|
||||
|
||||
.Page(1, 10).ToSql("Id");
|
||||
|
||||
var sqlextMax1 = g.mysql.Select<EdiItem>()
|
||||
var sqlextMax1 = g.sqlserver.Select<EdiItem>()
|
||||
.GroupBy(a => a.Id)
|
||||
.ToSql(a => new
|
||||
{
|
||||
Id = a.Key, EdiId = SqlExt.Max(a.Key).Over().ToValue()
|
||||
Id = a.Key,
|
||||
EdiId1 = SqlExt.Max(a.Key).Over().PartitionBy(new { a.Value.EdiId, a.Value.Id }).OrderByDescending(new { a.Value.EdiId, a.Value.Id }).ToValue(),
|
||||
EdiId2 = SqlExt.Max(a.Key).Over().PartitionBy(a.Value.EdiId).OrderByDescending(a.Value.Id).ToValue(),
|
||||
});
|
||||
|
||||
var sqlextGroupConcat = g.mysql.Select<Edi, EdiItem>()
|
||||
|
Reference in New Issue
Block a user