Reputation: 244
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?
Upvotes: 1
Views: 1883
Reputation: 481
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
Upvotes: 2
Reputation: 7860
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
Upvotes: 6