-
Type: New Feature
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: 2.2.4
-
Component/s: Feature Request
-
None
when using grop/project phase I'd to have ability to use typed extension instead of passing bson document
var project =
BsonDocument.Parse(
"{Key:1, Timestamp:1, year:{$year:'$Timestamp'}, dayOfYear:{$dayOfYear:'$Timestamp'}}");
var group = BsonDocument.Parse("{_id:
, count:{$sum:1}}");
var result = collection.Aggregate().Project(project).Group(group).ToList();
in this case i will expect that project will look like this:
.Project(i => new
{ i.Key, dayOfYear = i.Timestamp.GetDayOfYear, year = i.Timestamp.GetYear }):