Reputation: 4817
We are developing an Android app with Xamarin and want to use offline sync but we cannot connect our DTOs directly to the database, as is done in almost all examples and the Quickstart solution one can download from the Azure portal.
For now I'm using the ToDo sample app downloaded from the Azure portal, which by default is mapped to the address https://myappname.azurewebsites.net.
I have a WebApi application, whose address I put in the ToDo app's settings and with a catch-all route saw that the app calls the address http://mywebapidev/tables/todoitem. In the WebApi application I added the route /tables/{controller} route and a controller called ToDoItemController, which inherits from TableController.
I also implemented my own DomainManager, which I'm setting in Initialize
public class ToDoItemController : TableController<ToDoItem>
{
protected override void Initialize(HttpControllerContext controllerContext)
{
base.Initialize(controllerContext);
this.DomainManager = new MyDomainManager();
}
}
My question is, what do I need to implement (in the controller and elsewhere) for it to be able to work as the backend for Azure Client SDK offline sync?
Upvotes: 0
Views: 355
Reputation: 8035
I suggest you read http://aka.ms/zumobook - especially chapter 3. It goes through the process of offline sync rather thoroughly.
Short version though:
Upvotes: 1