Tip 52 – How to re-use Types with the Data Services client

By default when you add a Data Service Service Reference you get automatic code-generation, which produces a strongly typed DataServiceContext and classes for all your ResourceTypes. You can have a look at this generated code if you ‘show all files’ in your project: And then expand your Data Service Reference, it’s dependant Reference.datasvcmap and open…

2

Creating a Data Service Provider – Part 6 – Query Interactions

Whenever I find myself implementing a series of interfaces to plug into a framework or server, I always find myself wondering how the server will call my implementations. For me this is about forming a mental model to simplify how I think about what I’m doing. In fact as I’ve been doing this DSP series…

11

Creating a Data Service Provider – Part 5 – Query

In Part 4 of our series showing how to implement a Custom Data Service Provider we hooked up an incomplete implementation of IDataServiceQueryProvider, just enough to get the ServiceDocument and $metadata working. In this part we’ll get query working too. To do that we need to know where the data is going to come from…

4

Tip 50 – How to query a Data Service using JQuery

Recently I’ve been spending some of my time playing with JQuery. And because Data Services can expose data in JSON format, I thought I’d use JQuery to grab some data from a Data Service. Turns out it is pretty simple. This example isn’t going to win any beauty awards, but it will show you the…

6

Creating a Data Service Provider – Part 4 – Minimal Running Service

This is Part 4 of my ongoing series of posts showing how to create an Custom Data Service Provider. NOTE: I’ve done a little refactoring to the code in Part 3 to simplify the code in this post, so be sure to check that out if you’ve been following along. In Parts 2 & 3 …

2

Creating a Data Service Provider – Part 3 – IDataServiceMetadataProvider

UPDATE: I’ve made a few updates to the code / write-up to reflect refactors I’ve made as I’ve implemented more of the interfaces. This is Part 3 of my ongoing series on Creating a Data Service Provider, and in this post we’ll look at how to implement IDataServiceMetadataProvider IDataServiceMetadataProvider is responsible for describing the shape…

10

Custom Data Service Providers

Introduction Data Services sits above a Data Service Provider, which is responsible for interacting with the underlying Data Source on behalf of the Data Service. Data Services ships with some internal providers, and makes it possible for you to create custom providers too. So the obvious question is… Do you need a Custom Data Provider?…

14

Creating a Data Service Provider – Part 2 – IServiceProvider & DataSources

To create a read-only Data Service Provider (or DSP) you need to implement two Data Services interfaces: IDataServiceMetadataProvider to provide the metadata and IDataServiceQueryProvider to handle the queries. But first Data Services needs a way to find your implementations. IServiceProvider Data Services locates these interfaces using the IServiceProvider interface.  Probably the best way to hook into…

2

Creating a Data Service Provider – Part 1 – Intro

One of the the coolest things about Data Services is its provider model. Any data-source can be exposed as an OData Data Service simply by implementing a few interfaces. SharePoint 2010 implements these interfaces to expose list data, and you can too, to expose just about anything: Facebook? Twitter? You name it.Once you’ve done that you can…

1