Reputation: 3437
How can I share data between an instance of an MVC Web App and an Mobile App client say Android.
From the App Service documentation it is stated that we can use "(For .NET) Leverage any feature of ASP.NET, including MVC"
Following the standard Azure Todo List tutorial, if I create an Azure App Service, add and publish an Android Client with the Todo List object. If I want to add another object say Student.cs that should be shared between an MVC Web app and the Android client.
The goal is to do data entry in the web app and pull and display the data in the mobile app.
Upvotes: 2
Views: 694
Reputation: 8035
You can combine the Azure Mobile App and Azure Web App into one single entity. Your application has access to the OData v3 endpoints as https://{yoursite}.azurewebsites.net/table/{your-table} and your application can do regular AJAX REST calls from the client. In addition, Entity Framework is fully set up so you can access the tables directly using Entity Framework.
So, set up your entities with a base class on EntityData, then use those with Entity Framework as normal. Scaffold your mobile web API using the Azure Mobile Apps SDK TableController.
Upvotes: 2