//创建约束生成器
FilterDefinitionBuilder<BsonDocument> builderFilter = Builders<BsonDocument>.Filter;
//约束条件
FilterDefinition<BsonDocument> filter = builder.And(builder.Gt("Sum", "2"), builder.Eq("DepartmentName", "运维"));
var result = coll.Find<BsonDocument>(filter).ToList();
foreach (var item in result)
{
//取出整条值
Console.WriteLine(item.AsBsonValue);
}
请教下 如何将result 转成对应的list<T> 集合??? 我要将集合返回到前台去。下面是我代码
已解决!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!