I use Xamarin Forms and WindowsAzure.MobileServices.SQLiteStore NuGet to handle synchronization between my sqlite database and my azure database. Everything works fine, but when I want to log out of my user, I want to clear the database. Thus, at the next login, it will restore the database again and synchronize from scratch. I tried to clear the tables, but that only deletes local data, and when you log in, it will only sync any new data.
Currently, my order does the following:
MobileServiceSQLiteStore store { get; set; }
public MobileServiceClient MobileService { get; set; }
public async Task Dispose()
{
try
{
initialized = false;
store.Dispose();
MobileService.Dispose();
store = null;
MobileService = null;
}
catch (Exception ex)
{
throw ex;
}
}
Any idea how I can clear the sqlite database upon logout using this component? Thank!