Tip 49 – How to find your Data Service bug

I’ve been playing around with creating a custom Astoria Data Service Provider, aka DSP, for a while now. So far I’d managed to get my metadata all setup, so browsing to $metadata works great. I’d got a few simple queries work. Basically everything was going fine. At least until I tried this URL: I wasn’t…

4

Tip 48 – How to host a Data Service in WCF

Every wonder if you can host an Astoria Data Service in WCF? Well turns out the answer is yes, in fact once you’ve got your references set up etc it is pretty easy. Step 1 – Setting up your project Here is what my working project looks like: In this example I am using VS…

1

Tip 47 – How fix-up can make it hard to change relationships

Problem: Take this code: Category oldCategory = ctx.Categories     .Include(“Products”)     .First(c => c.Name == “Drink”); Category newCategory = new Category {Name = “Beverage”}; foreach(Product product in oldCategory.Products) {     newCategory.Products.Add(product); } Ignore for a second that in this example the solution is probably just to rename the oldCategory “Beverages” – Coming up with real…

2