我正在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();
}