Add dateOperator extensions

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.2.4
    • Component/s: Feature Request
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:

      {year:'$year', dayOfYear:'$dayOfYear'}

      , 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 }

      ):

              Assignee:
              Unassigned
              Reporter:
              Greg
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: