0

如何在 Norm 驱动程序中构建多标准查询,为一个现有的基本查询添加额外的过滤器?谢谢。

var coll= mongo.GetCollection<TaggedContents>();  
var coll2 = coll.AsQueryable().Where(x=> x.ID==ID && x.Name=="Name");  
var coll3 = coll2.AsQueryable().Where(x=> x.TagId==tagId && x.TagName=="TagName");
4

1 回答 1

0

That looks like a candidate for the LINQ Union operator, roughly the SQL equivalent of "AND" or "OR"

于 2010-12-15T20:52:24.673 回答