Devi Prasad
Devi Prasad

Reputation: 839

Can i use my own database in Azure mobile services for Windows Phone 8.1 apps?

When creating a new service for my Windows Phone 8.1 database is also created for that service. Instead of using service created database, can I use my own database which is located in webhost4life.com? Can I use this database, located on that server, for data adding.

Upvotes: 0

Views: 83

Answers (3)

Derek
Derek

Reputation: 837

When you create a mobile service,a SQL database is required by default. But Microsoft Azure also provide options to make it easy to take advantage of existing assests in building a mobile service. Supported assets include any resource that runs on a static TCP port, including Microsoft SQL Server, MySQL, HTTP Web APIs, and most custom web services.

See details at https://azure.microsoft.com/zh-cn/documentation/articles/mobile-services-dotnet-backend-use-existing-sql-database/ and https://azure.microsoft.com/zh-cn/documentation/articles/mobile-services-dotnet-backend-hybrid-connections-get-started/

Upvotes: 0

AIDAN CASEY
AIDAN CASEY

Reputation: 319

Yes you absolutely can ! Check out this blog post on how to connect mobile services to a MongoDB backend. You just need to overwrite the backend scriptlets to handle the CRUD operations http://blogs.msdn.com/b/azuremobile/archive/2014/04/14/creating-mongodb-backed-tables-in-azure-mobile-services-with-net-backend.aspx

Upvotes: 0

David Makogon
David Makogon

Reputation: 71118

By default, whenever you create a mobile service, you're required to specify a SQL database as well. You do not need to use this database. You can connect to any database you want to, from your mobile service backend code, and do whatever you want.

Just note that might need to create custom API calls, rather than the built-in CRUD operations, since the CRUD operations take advantage of a table class derivative that takes care of a lot of ORM-based things for you. If you plan on bypassing all of that, then the custom API route will let you do that.

Upvotes: 1

Related Questions