Fix missing Edm.Time (TimeSpan) support in OData v2 filter expressions - #57
Merged
Merged
Conversation
Copilot
AI
changed the title
Add OData v2 Edm.Time / TimeSpan filter support
Fix missing Edm.Time (TimeSpan) support in OData v2 filter expressions
Jul 1, 2026
Copilot created this pull request from a session on behalf of
joadan
July 1, 2026 11:14
View session
joadan
marked this pull request as ready for review
July 1, 2026 13:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TimeSpanproperties (mapped fromEdm.Timein OData v2) could not be used in LINQ filter expressions —AppendByValueTypehad no handler forTimeSpan, causingNotSupportedException. NoToODataFilteroverload existed forTimeSpaninFilterHelper.Changes
FilterHelper.cs— AddedToODataFilter(TimeSpan, ODataVersion)and nullable overload. Producestime'PT9H18M39S'for v2/v3 andduration'PT9H18M39S'for v4, usingXmlConvert.ToStringfor ISO 8601 duration serialization.FilterExpressionVisitor.cs— AddedTimeSpanbranch inAppendByValueType(TypeCode.Object), delegating to the newFilterHelperoverload.FilterExpressionTests.cs— AddedDuration/OptionalDuration(TimeSpan/TimeSpan?) toTestProduct; added#region TimeSpan Testscovering v2/v4 literals, comparison operators, nullable, and inline constants.ODataTimeSpanConverterTests.cs— Added"PT09H18M39S"(the exact server-reported value) as an inline theory case; added OData v2 response round-trip tests for both non-nullable and nullableEdm.Timeproperties.Example