Код: Выделить всё
IAsyncCursor result = await _repository.GetBsonAggregateAsync(pipeline);
var resultdata = await result.ToListAsync();
Код: Выделить всё
"{ ""_id"" : { ""type"" : ""Printer"" }, ""total"" : 1 }"
Код: Выделить всё
class PrinterModel
{
public string Type { get; set; }
public int Total { get; set; }
}
Подробнее здесь: https://stackoverflow.com/questions/792 ... tructure-i