0
MongoDB中C#2.0驅動程序MongoDB的C#2.0的驅動程序,如何尋找並找到或如何所在的位置以及和所有計數()
··· var lists = base.Collection.Aggregate();
if (cId > 0)
{
lists = lists.Match(n => n.cId == cId);
}
if (!string.IsNullOrEmpty(spell))
{
lists = lists.Match(n => n.Spell == spell || n.Name == spell);
}
// var count = lists.count();
var results = lists.ToListAsync().GetAwaiter().GetResult()
...
是的,這是工作,
但我想知道名單MongoDB中1.x的驅動程序的所有count()
,以Skip()
和Limit()
var lists = base.collection.AsQueryable().where(n => n.cId == cId).where(n => n.Spell == spell || n.Name == spell));
var count = lists.count();
var result = lists.skip(10).limit(20).tolist();
我的問題:
如果比賽是正確的。如何馬成順得到所有結果count()
,如果用火柴是不完美的方式,如何寫這個代碼