-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support NodaTime #1682
Comments
Might be that this too (as with #809) would be better served as extension. |
Any reason this doesn't already work after adding the EF Core package? NodaTime uses The Did you actually try to use NodaTime? |
@bkoelman no didn't actually give it a shot and made some assumptions which I see might be wrong, sorry. I'll see if I can get some more substantial information here ASAP. |
It will certainly eat it, but default serialization of nodatime interval isn't very usable: {
"start": {},
"hasStart": true,
"end": {},
"hasEnd": true,
"duration": {
"days": 2915343,
"nanosecondOfDay": 86399999999999,
"hours": 23,
"minutes": 59,
"seconds": 59,
"milliseconds": 999,
"subsecondTicks": 9999999,
"subsecondNanoseconds": 999999999,
"bclCompatibleTicks": 2518857216000000000,
"totalDays": 2915344,
"totalHours": 69968256,
"totalMinutes": 4198095360,
"totalSeconds": 251885721600,
"totalMilliseconds": 251885721600000,
"totalTicks": 2518857216000000000,
"totalNanoseconds": 251885721600000000000
} I'm not sure I can make sense of filtering interval with lessThan / greaterThan.. but I don't think the parser knows what do do with it regardless, resulting in fx. |
About the serialization, did you call If so, then apparently this is how NodaTime serializes to JSON. You could always insert your own JsonConverter if you don't like it. About the conversion, I don't know. Does the library provide something to register type converters to .NET? It would help if you could share a minimal sample that can be debugged. |
Correctly configuring serialization as you suggest definitely makes it look much better: {
"start": "2018-01-22T00:00:00Z",
"end": "9999-12-31T23:59:59.999999999Z"
} Sorry again for not doing my homework. I will return with better info if possible. |
Goal would be same level of support as for native datetime and DateTimeOffset and ideally it would be possible to use contains filter against a NodaTime interval.
Alternatives I've thought about are custom logic in ResourceDefinition.
The text was updated successfully, but these errors were encountered: