In recent years, it becomes more and more common that enterprises are tranferring their websites to mobile apps. By transferring, I mean that they want both versions of their apps. That will give us a scenario that our users, especially for Microsoft customers, they will want a same database structure even a same set of Web API to use for both Website and mobile apps.
This blog is exactly the same situation here. I got one customer who already has a website and its Web API is based on .NET Core 2.0. However, he’s trying to use the Xamarin.Forms to build an app and also using the Azure Mobile Apps SDK to enable the offline sync feature in his app.
Of course, he wants the Web API to be the same for both Website and Mobile app.
If you use a mobile app, you will be handling data sync with the database. When the network is good on your mobile, you will never meet issue to query/add/update/delete from database and sync back with your mobile app.
However, you will never be confident that your mobile will always be under a good network situation. That’s where the offline sync fit in.
Offline sync allows users to interact with a mobile application, viewing, adding, or modifying data, even where there isn’t a network connection. Changes are stored in a local database, and once the device is online, the changes can be synced with the Azure Mobile Apps instance. This article explains how to add offline sync functionality to a Xamarin.Forms application.