Its fixed now.
I work on Windows Azure Mobile Services at Microsoft.
To query the customers table by ID and only get one result back, you can use customerTable.LookupAsync(customerId) - this will throw an exception if it fails to find a record with the specified ID so its more like Single rather than SingleByDefault.
You mentioned that you want SingleOrDefault, but the code in your constructor assumes that you have a valid reference, so this makes me think that LookupAsync is exactly what you want (better to get an exception that says "no customer with ID: 999 found" than simply a NullReferenceException).
One more tip: don't refresh the entire Azure portal when you just want to see if your data has been saved! There is a refresh button on the bottom of the page when you have the browse tab open. Its much faster
Hope this helps,
Thanks for your great questions!
1. At the moment we see some developers working with their script directly within the UI while others write scripts in a separate editor and paste them in. We are working on a command line interface for Mobile Services which includes direct script upload - expect to hear more about this very soon.
When it comes to local testing, the most common pattern used at the moment is to extract as much of your logic as possible into a seperate object or set of functions and to unit test those. Unfortunately we do not have a local test environment or harness that you can use to test the entire script.
When it comes to debugging, you can use the console object to write to your logs which are available on the 'logs' tab in the portal. This is very useful when it comes to figuring out what is going wrong in a script.
2. There is a bunch of existing functionality that scripts can access using require(). We run scripts in node.js so standard node libraries like 'querystring', 'crypto', etc are all available for scripts to use. There are a few other libraries that we also make available - for example you can require('request') to get a great library for working with HTTP, and require('sendgrid') in order to send emails via the popular SendGrid service.
When it comes to reusing your own code, we recognize that we do not really enable this yet beyond copy/paste and we are actively working on addressing this issue.
Hi Fred, I wrote a blog post that covers how you can try out the samples using the Windows 8 developer preview:
Hi Dominic! I understand where you are coming from, but WebSockets is a new feature for IIS 8.0. At this stage there is no plan to support earlier versions of IIS.
Correct. You would get something like a "PlatformNotSupportedException".
If you'd like step by step instructions in setting up a Win8 preview machine and running the samples we showed in this talk, they are now available on my blog: