1

I want to use a database hosted on Azure with some sort of backend for my app made with apache cordova tools for visual studio.

My thought was that I could create my JS object in the app itself send that to the C#/JS code on azure which will then put that data in the database.

I have created an Azure .NET mobile service with a database but I have no idea how to actually use it to store data.

File Structure

1) How do I pass data from my app to the db?
2) Do I need C# code?
3) Where do I put it?

2 Answers 2

2

This tutorial shows how to work with the PhoneGap version of Cordova against a JavaScript backend Mobile Service:

https://azure.microsoft.com/en-us/documentation/articles/mobile-services-javascript-backend-phonegap-get-started/

Here's one for regular Cordova: http://blogs.msdn.com/b/writingdata_services/archive/2015/01/26/azure-mobile-services-quickstart-for-visual-studio-cordova.aspx

You do not have to use C# - Mobile Services offers a Node.JS backend as well. Both provide a table abstraction that is covered in the tutorials. Basically, your Cordova client would reference the tables object on your MobileServiceClient, and then you can use the insert/read/update/delete methods exposed there with simple JSON objects.

Sign up to request clarification or add additional context in comments.

Comments

1

what you can do:

  1. Post data through Web Api Rest calls from angular to a c#
    controller.

  2. Retrieve the data in the controller using HttpResponseMessage and HttpRequestMessage

  3. Create an Edmx for the azure database, refer it in the connectionstring.

  4. Now Refer to the database table and store it.

this is an overview. read about Edmx here: https://msdn.microsoft.com/en-us/library/vstudio/cc716703(v=vs.100).aspx

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.