Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Linq query via OData WCF Data Service problems
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Greg Vazzana  
View profile  
 More options Oct 2 2012, 4:04 pm
From: Greg Vazzana <vazz...@gmail.com>
Date: Tue, 2 Oct 2012 13:04:28 -0700 (PDT)
Local: Tues, Oct 2 2012 4:04 pm
Subject: Linq query via OData WCF Data Service problems

Hi,

I am trying to hook up a Mongo back-end to expose OData via WCF Data
Services.  For some reason when I run a query through the service such as:

http://localhost/odata/MyData()?$filter=substringof('New',Name)

An exception is thrown.  I have tracked it down to
protected virtual Expression VisitConditional(ConditionalExpression node)
in ExpressionVisitor.cs where data types do not match because one size of
the conditional is Boolean and the other is Nullable<Boolean>.

According to the debugger this is the expression getting processed:
.If ($it.Name == null) {
    null

} .Else {

    (System.Nullable`1[System.Boolean]).Call ($it.Name).Contains("New")

}

Anyone have any thoughts?

Thanks,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
craiggwilson  
View profile  
 More options Oct 2 2012, 5:00 pm
From: craiggwilson <craiggwil...@gmail.com>
Date: Tue, 2 Oct 2012 14:00:52 -0700 (PDT)
Local: Tues, Oct 2 2012 5:00 pm
Subject: Re: Linq query via OData WCF Data Service problems

If you are going to use the reflection provider, you will need to employ a
couple of tricks to make it work.  This is an issue with how WCF Data
Services interacts with an object model.  You can read about this here:
http://blog.davidebbo.com/2011/08/how-odata-quirk-killed-nuget-server....

Alternatively, I have written a project that handles this for you already
here: https://github.com/craiggwilson/mongo-dotnet-odata.  I'm still
working on Update support.  It is mostly finished, I just haven't finished
getting it fully tested, so you can pull the source.  If you don't need
updating, just go to nuget and pull down MongoDB.OData.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Greg Vazzana  
View profile  
 More options Oct 3 2012, 8:15 am
From: Greg Vazzana <vazz...@gmail.com>
Date: Wed, 3 Oct 2012 05:15:28 -0700 (PDT)
Local: Wed, Oct 3 2012 8:15 am
Subject: Re: Linq query via OData WCF Data Service problems

I did notice that the Linq queries are going through 2 different code paths
when I wrote a test app vs. getting the query via the WCF Data Service.  
Currently I am using the reflection provider, but I will likely have to
change that in the future to properly expose our data.

Thanks for the links.  I will be diving in soon (your project looks
interesting).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »