Update mongodb

This commit is contained in:
sunkaixuan
2025-06-11 18:41:47 +08:00
parent 0e9cb3176b
commit b3da93082b
5 changed files with 91 additions and 346 deletions

View File

@@ -118,13 +118,13 @@ namespace MongoDbTest
Name2 = "b"+it.Name
}).ToDataTable();
//var list13 = db.Queryable<OrderInfo>()
// .GroupBy(it=>it.Name)
// .Select(it => new
// {
// Id = it.Name,
// Name =SqlFunc.AggregateMax(it.Id)
// }).ToList();
var list13 = db.Queryable<OrderInfo>()
.GroupBy(it => it.Name)
.Select(it => new
{
Id = it.Name,
MyCount = SqlFunc.AggregateCount(it.Id)
}).ToList();
//测试生成SQL性能
TestSqlBuilder(db);
}