Search code examples
asp.netazureazure-web-app-serviceazure-mobile-services

Web App and Mobile App with same database in Azure


My aim is to develop a web app and a mobile app that share data from the same database. What is the best way to achieve this (using azure)?

I think I should:

  • Create a Web App from Azure Portal with a SQL Database
  • Create a Mobile App from Azure Portal with an existing Database (the one I created before)

Then I'll develop my ASP.net MVC project, using Entity Framework to create the db Schema and I'll publish it in Azure. Finally I'll develope my mobile app (in this case I would like to use Xamarin) and I'll access to the database (created before) using the code for Easy Tables.

Is it right? Or I'm thinking wrong and this isn't the best architecture to share the same database between a web app and a mobile app using Azure?


Solution

  • This should be fine. Keep in mind that the Azure Mobile Apps server will automatically add some system columns to your database tables (createdAt, updatedAt, deleted and version). Also, a limitation of Mobile Apps is that the primary key name must be called id.