当前位置: 动力学知识库 > 问答 > 编程问答 >

Sharing Tables between Azure Mobile Service and Azure Website

问题描述:

I want to create a website and a windows 8 app that share the same database. I followed this tutorial to create the website https://www.windowsazure.com/en-us/develop/net/tutorials/web-site-with-sql-database/ and I used the Azure Management Portal to create my mobile service.

Though each of them work perfectly, I cannot get the tables I publish through the web application to show up in my mobile service. And when I connect in my JS app using

var mobileService = new Microsoft.WindowsAzure.MobileServices.MobileServiceClient(

"url",

"secret"

);

the tables don't exist.

How can I share these tables between the two services?

网友答案:

the Azure Mobile Services creates its tables under it's own schema (the service name). you have to move your existing tables to this schema and you have to add them in the Azure Mobile Services Portal.

see: Using existing database with Azure Mobile Services

网友答案:

Paul Batum, a PM on the Mobile Services team, outlines a quick solution here: http://social.msdn.microsoft.com/Forums/en-US/azuremobile/thread/60764eb6-17d0-4395-a887-2a793b44ce88

Chris Risner, a Developer Evangelist for Mobile Services, also provides a full walk through here: http://chrisrisner.com/Connecting-an-Existing-Database-to-Windows-Azure-Mobile-Services

分享给朋友:
您可能感兴趣的文章:
随机阅读: