views:

38

answers:

2

I have a Silverlight app that I want to be hosted on Azure. I have a data entity that represents a type of data I want to store. This tutorial tells me I need to make that class inherit from Entity. I'm not sure what that class is. Has it been renamed to TableStorageEntity?

TableStorageEntity is from Microsoft.WindowsAzure.StorageClient.dll, but I can't add a reference to it from my Silverlight project. (It says that only certain DLLs are allowed to work with Silverlight.) What am I supposed to be doing here? Make a different project?

+2  A: 

All data access will occur server-side, not in the Silverlight client. All data transfer with Silverlight is via service calls (RIA service calls in the example you link to).

Try adding the DLL references to your hosting web app/WCF provider instead. The data transfer to/from Azure is performed on your server app.

Enough already
Ok. How do I transfer data between server and client side?
Rosarch
Also, does that mean that my data model should be in my web role project instead of in my Silverlight project?
Rosarch
@Rosarch: Ria services generates client-side proxy objects and a domain context to use, based on server-side declarations. It also wraps up all the WCF communication for you. All data access is done server-side, so that *is* where your datamodel will live. You will need to study how to create RIA services, but it can sit on top of POCO, EF, other WCF calls... (pretty much work with anything your host can talk to).
Enough already
@HiTech Magic ok, sounds good. Can you recommend some good articles/tutorials/documentation about that?
Rosarch
@Rosarch: There are a number of videos on http://channel9.msdn.com, but as always you just need to hunt around the various sites and start with the basic 101 tutorials. It takes a little getting your head around, but well worth the effort.
Enough already
+1  A: 

Azure Table Storage exposes a REST API through WCF Data Services out of the box. You don't need to add an EF layer on top of it if you don't want to. You can code access by hand (it's a bit more complicated due to the authentication requirements) or use can use a client library for Silverlight. Very good example and a discussion of the differences and a decent walk through on Channel9.

Per Comment: Yes. Here are some well-known OData producers.

JP Alioto
Thanks. Does Azure Table Storage implement OData? (The WCF link is about OData.)
Rosarch