Tagged Questions
10
votes
2answers
340 views
Is there a general method to check whether a property define supported by a Linq provider, especially OData?
I successfully ran the following statement with the NorthWind.sdf in LinqPad:
from s in Shippers
select new
{
s.ShipperID,
s.CompanyName,
Count=s.ShipViaOrders.Count()
}
...
6
votes
2answers
1k views
Return Count from Netflix oData Service When the LINQ Count() Method Doesn't Work
Is there a way to use a LINQ expression to request a Count query from the Netflix oData service in Silverlight 4?
The Netflix documentation shows that you can return counts by appending $count to a ...
4
votes
3answers
5k views
Use LINQ to query nested OData collection
I'm playing around with the new Netflix OData feed (http://odata.netflix.com/Catalog/) and having some issues. I'm trying to learn LINQ at the same time but having difficulty doing what I thought was ...
4
votes
1answer
123 views
EBay OData Type Provider in F# and getting no results with LINQ
Can anyone help me understand why the piece of code below returns no results from the query yet the second sample does (though woe betide me if I try to use criteria on the second one!)
type ...
4
votes
2answers
427 views
Parse a string to predicate
I'm trying to work out a solution, where at runtime a procedure would parse a "string" and return a predicate. so far what I've found is DynamicLinq class (sample) that does the job.
I'm wondering - ...
3
votes
2answers
2k views
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 ...
3
votes
1answer
892 views
Netflix OData with LINQ: “The method 'Select' is not supported.”
I'm following a (poor?) example of querying the Netflix catalog by using the following code:
NetflixCatalog cat = new NetflixCatalog(CatalogUri);
IQueryable<Title> query = from person ...
3
votes
1answer
279 views
Errors translating Linq expression to URI: The method 'Select' is not supported
Here is my failing code
var query = from gg in Client.wcf.context.Good
from cc in Client.wcf.context.Customer
from ch in Client.wcf.context.CashHeading
...
3
votes
2answers
121 views
OData Linq to Query String
I'm using Web API with OData Query support (nighties) and while I'm aware that the WCF library gives you the ability to query WCF RIA Service URLs what I'm looking for is a lightweight way of ...
3
votes
1answer
617 views
Mapping $filter from oData parameter to linq Where
I've got (what I think is a odata format) url like this:
...
2
votes
4answers
208 views
Error when using WCF dataservice
I'm following this guide and I am getting an error. Can anyone help me?
The code for my datamodel is below
namespace Datalayer {
public class DataModel {
public DataModel()
{
...
2
votes
3answers
310 views
Get a count of a linked collection using OData and LINQ
I set up the OData feed for Stack Overflow as outlined in the wonderful article Using LINQPad to Query Stack Overflow and I want to do something like:
Users.Where(x=>x.Badges.Count==0).Take(5)
...
2
votes
3answers
578 views
How do I use linq to do a WHERE against a collection object (using Netflix data source)
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.
...
2
votes
1answer
421 views
What are the query limitations of OData?
I would like to know, in a nutshell, a summary of the limitations of using OData from the point of view of the query. For example:
Can I do recursive queries?
What subset of LINQ features it ...
2
votes
2answers
886 views
Convert OData Uri to his equivalent Linq expression
I'm creating a WCF service whose result is not a strict OData feed (for complicated reasons, business strategy, etc). In addition, the format of the URL is slightly different from OData although most ...