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
Sorting a dataset by a LocalDate property using OData '$orderby' command fails #232
Comments
Original comment by |
Original comment by |
Original comment by
|
I realize that I may be revising a long dead ticket here 🧟♂️, but figured I'd document/share some of my recent experiences here as my searches often bringing me back here. I was able to successfully able to persist NodaTime types RavenDB using Raven.Client.NodaTime and return NodaTime types in JSON using NodaTime Serialization for OData. However, I haven't figured out a way to utilize filtering just yet. This is what I've done to register Noda Types in oData's model builder: var builder = new ODataConventionModelBuilder();
builder.AddEnumType(typeof(NodaTime.IsoDayOfWeek));
builder.AddComplexType(typeof(NodaTime.Instant));
builder.AddComplexType(typeof(Nullable<NodaTime.Instant>));
builder.AddComplexType(typeof(NodaTime.Interval));
builder.AddComplexType(typeof(NodaTime.Duration));
builder.AddComplexType(typeof(NodaTime.DateTimeZone));
builder.AddComplexType(typeof(NodaTime.AnnualDate));
builder.AddComplexType(typeof(NodaTime.ZonedDateTime));
builder.AddComplexType(typeof(NodaTime.OffsetDate));
builder.AddComplexType(typeof(NodaTime.OffsetTime));
builder.AddComplexType(typeof(NodaTime.OffsetDateTime));
builder.AddComplexType(typeof(NodaTime.LocalDate));
builder.AddComplexType(typeof(NodaTime.LocalTime));
builder.AddComplexType(typeof(NodaTime.LocalDateTime)); At this point, I'm going to test projecting the queryable results from NodaTime tyes into System.DateOffset to determine if I can use that for filtering instead. Hopefully this may help anyone else who may have found themselves in a similar situation. That said, I'm considering digging a little deeper into OData to see if there is a way that NodaTime types can be registered in the model along with the capability to filter on |
@mikhey can you tell me how you used |
@sniperwolfpk5 Off hand I don't recall, when I get back to my office, I open up the project and get the details. |
Original issue reported on code.google.com by
have...@gmail.com
on 27 Jul 2013 at 4:51Attachments:
The text was updated successfully, but these errors were encountered: