[CSHARP-1869] Full featured LINQ support for TimeSpan Created: 18/Dec/16 Updated: 15/Nov/22 |
|
| Status: | Backlog |
| Project: | C# Driver |
| Component/s: | Linq |
| Affects Version/s: | 2.3 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Frédéric Barrière | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
MongoDB.Driver 2.3.0 |
||
| Description |
|
I want to create an simple aggregation request using linq expression to extract groups and calculate some values. collection.Aggregate() ); The Sum of Duration property for group does not work. There is no Sum extension method that accept a TimeSpan in System.Linq.Enumerable. So how to do. I do not want to used aggregate API with BsonDocument. I want to use linq expression as it allow to abstract the data access layer and it is great for unit tests. |
| Comments |
| Comment by Robert Stam [ 15/Nov/22 ] | |||||||||||||
|
We should support all manner of TimeSpan operations. Just a few examples:
|