Multiple table queries using Azure Mobile Services and android

I am testing the Azure Mobile Services tool with an Android application. For CRUD single table operations, it works very well, but I could not find any documentation or examples in multitasking queries. Has anyone seen anything on this front - either in order to do something server-side (say, creating views), or on an Android device?

thanks

anton

+4
source share
1 answer

I don’t know if this is supported, but to create a view and access it through mobile services, you first need to create an object in the form of a table from the Azure portal, and then use sp_rename in the database to rename your table [servicename]. [tablename] in [servicename]. [tablename2] and finally create a view named [servicename]. [tablename]. I tested this and it seems to work. Here's how to change the ToDoItem table in a view from an example program provided by Microsoft:

sp_rename [enzotest.todoitem], [todoitem2]

CREATE VIEW enzotest.todoitem WITH DIAGRAMS IN THE VIEW OF SELECT id, [text], full FROM enzotest.todoitem2

You do not need to have SCHEMABINDING in place, but it helps to manage the object from the portal. Now that you have a view, you can easily join other tables.

+3
source

All Articles