We have an application that is using Azure Mobile services for offline sync capabilities connecting to an external API. The database schema has to be extended with a new table for data that will only be used on the mobile side. So, that table doesn't need to be synced to the server side.
I am wondering if there is a way to use the same Microsoft.WindowsAzure.MobileServices libraries as we do in other parts of the application (as all the data access layer is built on top of it), but making it either:
- ignore persisting the changes to that new table entirely (we don't need to keep track of those) - ideal solution
- OR purging the operations queue before every push/pull of the operations on that table - uglier, but acceptable
Documentation didn't specify use cases like this.
Basically, I'm looking for something like
_store.DefineTable<LocalEntity>();
await Client.SyncContext.InitializeAsync(_store);
// when we use the table...
// ideally this would only save it to the local SQLite, and not to the operations queue
var table = _client.GetSyncTable<LocalEntity>();
await table.InsertAsync(instanceOfLocalEntity);
// when we sync up
// alternatively, make this ignore the LocalEntity table or see if there's a way to purge
// pending operations
await Client.SyncContext.PushAsync();
We could set up a new SQLiteConnection within the app to handle this table separately, but that seems overkill. Any ideas?