Details
-
New Feature
-
Resolution: Done
-
Minor - P4
-
None
-
2.2.4
-
None
Description
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 }):