wcf-data-services

Where can I find information on creating a WCF Data Services Custom Data Service Provider?

Our team is evaluating using WCF Data Services (formerly ADO.NET Data Services), and have determined we'll have to create a Custom Data Service Provider. Where can we find a sample implementation of the two required interfaces: IDataServiceMetadataProvider and IDataServiceQueryProvider? EDIT: Note that a "WCF Custom Data Service Provid...

Many-to-many relationship in .NET RIA services

I have a many-to-many relationship in my database of objects A to B. When i create a domain service the metadata looks fine. A has a collections of Bs, B has a collection of As. So it is correct. However the *.g.cs file generated doesn't have the same relationship. Is there a way to make it work? I googled some answer to actually genera...

Using custom Data Service Providers, do I have any control over URLs that are returned?

I'm implementing several custom Data Service Providers in WCF Data Services: IDataServiceMetadataProvider IDataServiceQueryProvider IDataServiceUpdateProvider To illustrate the point of my question consider this made-up example: I have a resource called "Employee," which can be addressed in the following ways: MyDataService.svc/Em...

How to pass a collection of Entities to .NET RIA Data Service?

Is it possible to pass a collection of objects to a RIA Data Service query? I have no issues sending an Entity, an Int or an array of primitive types, but as soon as i declare a method like this public void GetLessonsConflicts(Lesson[] lessons) { } i get a compilation error " Operation named 'GetLessonsConflicts' does not confo...

Are "WCF Data Services" going in the right direction?

I really like the idea of "WCF Data Services" but how does it work in a real life scenario? WCF Data Services provide just a nice way for the client to CRUD the data. However it's very limited in what you can pass and get back. So one ends up having all the business logic written on a client side. It's probably ok for small applications ...

Uploading and downloading files using wcf data services?

I have been trying to find information regarding if it is possible to upload and download files using WCF Data Services (formerly ADO.NET Data Services), but haven't been able to make any leads due to perhaps less help content available on wcf data services on the web as of now. Is it possible for us to write a wcf data service so that ...

Authenticating WCF DataServices

Hi, I am trying to authenticate calls to a WCF DataServices service via Silverlight. Essentially, when a user logs in they get a special hash which should be embedded in the headers of every request to the WCF DataServices. Currently use this as a check via a QueryInterceptor method eg [QueryInterceptor("Orders")] public Expr...

What is the story with shared data synchronization using the MS AJAX 4.0 client library?

Consider a LOB site, where users work on a large shared dataset. Using Wcf Data Services on the server side and the DataContext and DataView from the AJAX 4.0 client library on the client side to enable CRUD operations. Getting the data on the initial load is straight forward, just query the server and display the data (in a table for e...

Dynamic JOIN across WCF Data Services

I am prototyping a generic data browser over WCF Data Services. The user can select the entities from a TreeView, thus I cannot hardcode the query result types and have to code the queries (URI or LINQ) dynamically. To offer joins across different Data Services I am loading the results from each Data Service to the client an try to dyn...

RESTful search centering on specific record within a larger query set

So I have a query that returns lets say 1000 records. I'm using paging to grab sections of that, and I know the total number of records due to the $inlinecount=allpages tag. I'd like to be able to grab a specific record, and know where in the 1000 records it lands. Let's say the record I'm looking for actually lands on record number 4...

Query ADO (WCF) Data Service and return a Bool

Note: I have installed the 3.5 update to make my data services run like 4. I have an ADO (WCF) Data Service up and running. I need to execute a query where it uses the "Any<>" function, which returns a bool value. I am not sure what the type of the query should be so that the bool value can be returned. For collection returns, I have...

How to use "SelectMany" with DataServiceQuery<>

I have the following DataServiceQuery running agaist an ADO Data Service (with the update installed to make it run like .net 4): DataServiceQuery<Account> q = (_gsc.Users .Where(c => c.UserId == myId) .SelectMany(c => c.ConsumerXref) .Select(x => x.Account) .Where(a => a.AccountName == "M...

Using REST WCF data service as a data source for SQL Reporting services

Guys, can anyone point me to a definitive Microsoft map for where Reporting Services is going regarding using WCF Data Services (ADO.NET Data Services, Astoria) as a data source? There's bits of fragmented info out there, some about creating custom data providers, some about some sort of extension enable connection to the Azure storage l...

HttpListner: intercept requests to WCF DataService

Hello, I want to use the .net class HttpListener to intercept requests to my selfhosted (WebServiceHost) WCF Data Service in order to add the "WWW-Authenticate" header to the response (for user authentication). But it seems like that the HttpListener doesn't intercept any requests that go to my dataservice. The HttpListner works for dif...

DataServiceConfiguration is internal so I can't enable WCF data paging?

Hi again, I have a problem with my WCF Data Service, and this one is just plain weird. I'm trying to enable paging so that large collections will be handled better, which was the whole idea behind me using data services in the first place. However, all the examples I've seen are based on using DataServiceConfiguration, as shown here: ...

Does WCF Data Services return invalid JSON?

I'm upgrading an application that was using jQuery 1.3.2 to consume a WCF Data Service (a.k.a. ADO.NET Data Services, a.k.a. Astoria) to use the latest version of jQuery (1.4.2). My application is now failing, with JSON parsing errors, because jQuery 1.4 now uses stricter JSON parsing. I've run the JSON returned by my data service throu...

Why is my ServiceOperation method missing from my WCF Data Services client proxy code?

I have a simple WCF Data Services service and I want to expose a Service Operation as follows: [System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)] public class ProductDataService : DataService<ProductRepository> { // This method is called only once to initialize service-wide policies. public static void ...

Ria Services vs WCF Dataservices

My Team are evaluation to a bigger Business portal. (Invoicing, Bookkeeping, Salaries.....) We are all used to work with DDD, O/R mappers with NHibernate as our first choice. We have chosen to work with CompositeWPF to keep modularity between all modules and part system in the business portal. Now we have evaluated Ria Services and are...

Running an existing LINQ query against a dynamic object (DataTable like)

Hello, I am working on a generic OData provider to go against a custom data provider that we have here. Thsi is fully dynamic in that I query the data provider for the table it knows. I have a basic storage structure in place so far based on the OData sample code. My problem is: OData supports queries and expects me to hand in an IQuer...

Change DataSource WCF Data Services

Anybody know how to change the current data source of a DataServices on the fly? by Example i want to consultthe service and pass a parameter saying to pick up another connection., Is Possible??? ...