开发者

Difficulty with Silverlight and Azure Table Storage

开发者 https://www.devze.com 2023-01-18 20:19 出处:网络
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

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?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消