TechEd 2010 Videos

If you didn’t get to TechEd – no problem – videos of all the sessions are available here. Including my Best Practices: Creating an OData Service using WCF Data Services session. If you watch that video and want to follow try it out – you can download all the source code I uploaded previously. Enjoy.


Tip 56 – Writing an OData Service using the Reflection Provider

At TechEd I got a lot of questions about how to expose Data as OData By now you probably know you can use Data Services and the Entity Framework to expose data from a database as an OData Service. You might even know you can use Data Services with a custom Data Service Provider to expose arbitrary data…


OData – WCF Data Services Best Practices from TechEd

Yesterday I promised to share all the code from my Best Practices – Creating an OData Service using WCF Data Services session at TechED. Note: you can find a recording of that session here. So here goes, essentially this is what I did: Downloaded, unzipped, opened and ran the MVC Music Store Sample.  Added an…


Creating a Data Service Provider – Part 9 – Un-typed

Background info: This post builds on Parts 1 thru 8 which teach you how to create a typed Data Service Provider. But now the part we’ve all been waiting for- an un-typed DSP – which is what I expect most real world DSP implementations will be based on. What do we mean by Un-typed? An…


Tip 55 – How to extend an IQueryable by wrapping it.

Over the last couple of years I’ve found myself in lots of situations where I’ve wanted to get ‘under the hood’ and see what is happening inside an IQueryable, but I haven’t had an easy solution, at least until now. Getting down and dirty like this is interesting because it means you can: Log Queries…


Creating a Data Service Provider – Part 8 – Relationships

In parts 1 thru 7 we made a Read / Write typed data service provider, although it was a little simplistic because it didn’t have relationships. So lets rectify that right now by adding a relationship to make this more ‘real-world’ Changes to our Classes If you remember from Part 3 we had just a…


Is hiding lower level APIs bad?

There are many good arguments for hiding away the lower layers in your stack – essentially the building blocks upon which your public API is built – however the ‘we don’t have the time and resources to test that layer completely’ argument seems a little flawed to me. Surely if you are sitting above a…


Tip 54 – How to improve performance using Statement Expressions

Background: While writing the update post in my Data Service Provider series I ended up writing this block of reflection code to copy properties values from one object to another: foreach (var prop in resourceType           .Properties           .Where(p => (p.Kind & ResourcePropertyKind.Key)                           != ResourcePropertyKind.Key)) {       var clrProp = clrType            .GetProperties()           …


Tip 53 – How to debug EF POCO mapping issues

If you are trying to use POCO classes in EF 4.0, it is relatively easy to run into problems with the mapping from your model to your CLR classes. If you get any nasty problems here, the best way to get to the bottom of things is to try to explicitly load the metadata for…


Creating a Data Service Provider – Part 7 – Update

In Parts 1 thru 6 we created a custom Read/Only provider over an in memory list of Products. Now it’s time to add update support. To do that we need to add an implementation of IDataServiceUpdateProvider. But first lets talk about the… Implications of Batching The IDataServiceUpdateProvider interface is designed to support Batching, allowing customers to…