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…

2

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…

6

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()           …

2

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…

2

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…

3