找不到类型或名称空间AggregateArgs mognodb C#

时间:2019-04-22 17:22:41

标签: c# mongodb

我正在C#中进行聚合,以获取仅实例化AggregateArgs属性时未获取数组的子集的获取结果

   public async Task<List<Documents>> GetDocument(string ownerId, string dependentId)
        {

            var args = new AggregateArgs { 

            Pipeline = BsonDocument.Parse("$project: {Dependentsbenefits: {$filter: {input: $Dependentsbenefits, as: depend, cond:{ $eq: [$$depend.dependentId, " + dependentId + "] }}}}");
                  };

        var result = _employee.Aggregate(Pipeline).ToList();
        }

0 个答案:

没有答案