odata

Select distinct values with odata

I'm trying to create a call to odata webservice that would select only distinct values of some property. Is there any good example of how to do this? ...

Bind Image in ODATA Service to Gridview Column

Hi. I have created a small application that uses Netflix odata service. I am binding the data to a GridView control. This works as expected expect the Image fields. Does anyone know how to bind the Image to a GridView column? For example, I am doing this to bind the other columns (this does not work for the image data that is in the...

How can I speed up Restlet for Android when using OData?

I am attempting to use Restlet for Android to query an OData data source. However, I am not impressed with its performance in both the emulator as well on a real device. I have the requests made in a wrapper AsyncTask to make the UI responsive but it still takes over 1 minute to finally return the objects. I get plenty of these in the L...

How to create a computed property in Data Services (OData)?

I am creating an OData service with WCF Data Services using an EDMX. How can I create a computed property for an entity type, so that its value gets computed in the service (C#) and does not come from the database? The value of this property is based on the value of other properties, which are mapped to fields in the database. ...

Can I Perform a 'Distinct' with a WCF Data Service (OData) Query?

I really need to be able to perform a 'DISTINCT' on a WCF Data Service query. From what I can tell, such a function doesn't exist. I know that I can use the Distinct extension method in the Linq query on the client, but it still hydrates the full result set (which isn't what I want in this particular case). Any ideas? ...

ODATA Consume Service Operation from C# ASP.NET 4.0

I am connecting to an ODATA Service via a C# ASP.NET application, which has service operations such as: GetItems(int? itemID, double? price) I can consume this without issues in my browser, e.g. http://api.mycompany.com/companycatalogue/GetItems?itemID=4 I understand how to use LINQ to Entities to consume an ODATA service, but can'...

OData implementation for ASP.NET MVC

We have a fairly straight forward line of business application implemented with ASP.NET MVC2 and we have a new requirement to be able to share our data with other parts of the business, which include SharePoint 2010, Ruby and Python. I'd like to use OData as the transport mechanism (as opposed to SOAP) using our existing MVC application...

Problems with an OData filter and a Guid field

I’m trying to get some code working using OData. The following bit of code doesn’t seem to work. ds is OpenDataServiceProxy. adapterTypeId is the string representation of a Guid. adapterName is a string name ds.query('/DataAdapters?$filter=DataAdapterType.DataAdapterTypeId eq guid(\'' + adapterTypeId + '\') and Name eq \'' + adapterN...

OData Consumer for Android - which OData tookit/framework should I use?

I am creating a program for Android mobiles which will query, retrieve and then process OData from an OData provider via a webservice. Please can you tell me which toolkit is best for this? I have seen these: odata4j restlet Thanks. ...

How can I update Azure Table Storage resource by implementing IDataServiceUpdateProvider?

I am trying to expose an editable Azure Table Storage table. (If it matters: to Win Phone 7 via the OData Client Lib CTP.) On the server side, I have a DataServiceContext : TableServiceContext, IDataServiceUpdateProvider I can add and delete objects, but when I try to update a resource, SaveChanges() does not appear to "pick up" the val...

How do I use OData Expand like a SQL join?

I'm trying to figure out how to accomplish the equivalent of: select * from Users u inner join Comments c on c.UserId = u.Id where Id = 1569 (table aliases for better sql readability) ...on the StackOverflow OData endpoint. How would this url be constructed? I'm looking at the documentation for Expand at OData.org and I would have th...

Request Genres by MovieId using LINQ to Netflix OData

I am trying to create a LINQ query to return genres by movieid. The LINQ works in LINQPAD4. Can someone help me with the proper syntax? I am getting the following errors: Cannot implicitly convert type 'System.Linq.IQueryable' to 'System.Linq.IQueryable'. An explicit conversion exists (are you missing a cast?) and Cannot imp...

LinqPad, odata and apikey url-parameter

I run an OData API. To control usage, an apikey affixed as an url parameter is required (I use a variation of this answer). I'd love for my users to be able to explore the data exposed by the API using LINQPad. Ufortunately, there's no way to tell LINQPad to stick the apikey parameter to the end of query urls. Are there any good suggest...

oData and EF4 - different result for the same query

I am running the following query... (from txRx in TxRxes where txRx.Serial == "someSerial" select txRx).Single().TxRxModes.Count() When I run this on the database using EF4 in LinqPad, I get the correct result of 1 back. When I run exactly the same query on the same database through oData (using the same underlying context) I get 0. ...

Work with OData secured service

I want to generate entity classes and Service class of OData secured service. In OData Java extension page it is written that I need to use org.restlet.ext.odata.Generator class that should get uri and output directory parameters. But if my OData service is secured the generator instance is not able to generate service classes without us...

How to escape a single quote to be used in an OData query?

I am using OData to query my database. The following line of code works fine when “adapterName” just contains text. ds.query('/DataAdapters?$filter=Name eq \'' + adapterName + '\'', ifmgr_CreateAdapter_Step1, onGenericFailure, ''); If “adapterName” contains a single quote it fails. I tried escaping the single quote by using the follow...

One WCF Service to Rule them All? (SOAP w https, oData, JSON, POX, etc...)

I've been playing around with WCF and I have managed to a WCF service to generate both SOAP, POX, and JSON formats pretty easily based on this example (I added the soap config). http://www.c-sharpcorner.com/UploadFile/ashutosh.shukla1/3040/Default.aspx And I see that if you add a timestamp field to your data base tables you can actuall...

DataSource.Table.Where(stringOfConstraint) does not exist in LinqToSQL for OData support?

I'm looking at this Telerik demo, and am unable to get the "count" statement to work. I believe that the following command is only supported on EntityFramework, and not Linq2SQL. return CurrentDataSource.Products.Where(where).Count(); The parameter "where" in lowercase is actually a string that is passed in the ADO.Net DataServices ...

LIKE in OData query

I am converting a project from using linq2sql to use an odata source. I am trying to lookup a user like this... FrameworkEntities db = new FrameworkEntities( new Uri("http://localhost/odata/FrameworkService.svc")); User user = db.Users.Where( u => SqlMethods.Like(u.UserName, UserName)).FirstOrDefault(); but am getting the erro...

Does anyone outside the MSFT community care about OData?

OData is being touted as a new open standard for REST-style data services, but I can't find much evidence of it being used in anger by anyone who isn't plugged into the MSFT developer community. If it's an open standard I would have expected to some more traction from the Java/Ruby/Python/PHP communities. The background behind the quest...