Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1700

Add dateOperator extensions

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Minor - P4 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:

      {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 Unassigned
            Reporter:
            profesor79 Greg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: