Created
November 22, 2016 09:59
-
-
Save guntidheerajkumar/ab2a7d795723dc3e3bd68c93bde0895e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task Initialize() | |
{ | |
if (client?.SyncContext?.IsInitialized ?? false) | |
{ | |
return; | |
} | |
var azureUrl = "http://<<AppName>>.azurewebsites.net"; | |
client = new MobileServiceClient(azureUrl); | |
var path = "employee.db"; | |
path = Path.Combine(MobileServiceClient.DefaultDatabasePath, path); | |
var store = new MobileServiceSQLiteStore(path); | |
store.DefineTable<EmployeeInfo>(); | |
await client.SyncContext.InitializeAsync(store, new MobileServiceSyncHandler()); | |
table = client.GetSyncTable<EmployeeInfo>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment