odata

OData WCF Data Services - Related data (by foreign key) doesn't show up when calling the service

When I get the data using the URL in browser, I'm able to see the related data, for example: http://localhost/services.svc/Dinners(1)/RSVPs That lists 5 RSVPs for DinnerId = 1 in my case, but when I'm consuming the OData from a different project, I can only retrieve Dinners, debugging the app shows that RSVPs = 0, while it should be 5....

Locking an OData DataServiceContext when calling from multiple BackgroundWorkers

I have a Silverlight 4 application that connects to an OData service. My model is submitting multiple queries to the service in parallel and in the query callback I am processing the results using a backgroundworker. This works great if I am making one call, but as soon as I make more than one call in parallel - sometimes it works - bu...

Omit meta-data from oData response

I'm experimenting with writing Javascript/JSONP queries against an WCF oData API. For performance reasons, I'm trying to keep the responses succinct. The default seems to be for the oData endpoint to return uri and type metadata with every returned result. This information can take up a significant portion of response payload. Is there a...

System.NotSupportedException: Can only project the last entity type in the query being translated.

I'm using LINQ with an ODATA web service from tp in TyrePatterns from t in tp.Tyres where t.Diameter == 195 select tp Seems simple enough, right? Tyres is a propery of TyrePatterns. So just to be sure you can see what I want to do, what I'm doing in the magical world of SQL would look something like: SELECT DISTINCT TyrePatterns.Name...

How do I filter entities by date range in odata4j?

The odata4j AppEngineConsumerExample demonstrates how to filter entities on string and numeric values with code similar to the following: reportEntity("\nNon-discontinued product with reorderLevel > 25 (two filter predicates): " , c.getEntities("Product") .filter("reorderLevel gt 25 and discontinued eq false") ...

OData Save/Validate a Complex Type

I am trying out OData and have a scenario were a customer would like to submit an order. The order will contain/require order items and there is some validation that needs to take place. So say I have Order(customerid, etc...) Order Item (1) Order Item (2) etc... I am curious how to handle this scenario. I've seen examples on how to ad...

How to store TSQL query results for later display

I've never used TSQL before, but I decided I wanted to poke around in the SO data dump anyways. So this is probably a rookie question. I did try to search for an answer, but I don't know the technical term for what I'm trying to do, and search is only so good if you don't have the right keywords. My goal is to find out how many question...

WCF OData service with Reflection Provider

We need to provide an API for an Activity Feed (think of Facebook) and we decided to give OData a try. We are using .NET so we went for WCF Data Service but we don't use Entity Framework (or any other ORM) so we will use the Reflection Provider. Because we have complex business logic for our retrieval methods we decided to expose them as...

How do I use linq to do a WHERE against a collection object (using Netflix data source)

Hello I am using LinqPad to learn Linq by querying the NetFlix OData source. (BTW I know their is a similar question already on SO...didn't help me). Here is the query I got working which is awesome. from x in Titles //where x.Rating=="PG" where x.Instant.Available==true where x.AverageRating>=4.0 //where x.Rating.StartsWith("TV")...

How can I tell if a given object has been saved using ADO.NET?

If I have a new object, that is not context.Saved() in ADO.NET, how can I tell that apart from another object that hasn't been saved? I'm going to use this information to determine how to handle my custom autoincrement feature. If the object has been saved to the database, I'll make a roundtrip to the database server. If the object ha...

authentication in wcf Rest

I have one solution and it is made of two kind of project one is asp.net and it's using .net membership for authenticate the users another project is WCF REST (Odata) , how I can authenticate the user in wcf project? ...

Accessing OData service gives 404 "Resource not found error".

Hi, This could be a entirely hosting service related problem but I'll post it here in case it is a more common problem. I'm running a OData service on my ASP.NET MVC 2 site which works fine on my laptop IIS but when I deploy it to my site at Winhost I get 404 Resource not found error when trying to access the .svc-file. Earlier I had ...

Problems with EDM associations

Hi, I'm making an OData service and using an EDM to map the structure of my database and specify associations between tables and create Navigation Properties. I've imported my tables into the EDM using the wizard. Things compile fine until I put in associations. I'm sure I've been able to do this before but for some reason it is screwi...

How to host WCF Data Service (OData) in IIS7?

Does anyone know how to host a WCF Data Service (or OData) inside IIS7? I'm seeing lots of articles about hosting WCF, but none specific to WCF Data Service. Thank you very much. ...

Can I validate an entity before saving the changes?

I have a very simple WCF Data Services application and I am doing some basic CRUD operations. I have a ChangeInterceptor on the entity set that is changing, but the object in the ChangeInterceptor is the current state in the database, not what is sent in the HTTP PUT. Is there a way to validate the properties of the object before saving ...

Why am I getting a NotSupportedException in WP7 Silveright using oDAta?

I have a WCF Service set up on my web site with a service. I can access all of the data I am trying to obtain using a web browser. When I navigate around I can filter and get to any part of the data I need, so the feed seems to be set up correctly. When I try to access this data using my auto-generated oData service reference I am runni...

DataServices XML to VB Code

I was given XML files I believe were generated from an oData service endpoint with the $metadata url parameter. My question, how do I take these files and generate classes? Or am I thinking about this all wrong? Be advised, these XML files were emailed to me. Cheers! ...

creating OData like services using RESTlet

I am trying to build a OData interface for Java application. From what I have seen, one can create fully compliant OData services using microsoft technologies (aka visual studio) using their WCF services. Am I of the right impression? I am trying to simulate OData services (it is also RESTful) using RESTlet + ROME(for atom feeds) + ROM...

How to handle json DateTime returned from WCF Data Services (OData)

I believe I am missing something obvious here. When I request a JSON response from an OData service I get a different result for the DateTime properties than I do when I request XML. I'll use the NerdDinner OData feed as an example. JSON: http://www.nerddinner.com/Services/OData.svc/Dinners(1)?$format=json "EventDate": "\/Date(12357648...

Filtering Asynchronous OData Queries on Windows Phone 7

I am working on an application for Windows Phone 7 that makes asynchronous queries to OData. I use the following general form for the query: DataServiceQuery<Entity> query = ourEntities.CreateQuery<Entity>("Entities"); entities.BeginExecute(QueryComplete, query); I am having trouble adding filters to these queries, though. Using LINQ ...