public async Task InitializeAsync() { if (MobileService?.SyncContext?.IsInitialized ?? false) { return; } MobileService = new MobileServiceClient(PCL_AppConstants.sCurrentServiceURL); string path = "appX007.db"; var store = new MobileServiceSQLiteStoreWithLogging(path, PCL_AppConstants.bLogSqlLite); store.DefineTable <TodoItem>(); await MobileService.SyncContext.InitializeAsync(store); itemsTable = MobileService.GetSyncTable <T>(); }
public async Task InitializeAsync() { if (MobileService?.SyncContext?.IsInitialized ?? false) { return; } MobileService = new MobileServiceClient(PCL_AppConstants.sCurrentServiceURL) { SerializerSettings = new MobileServiceJsonSerializerSettings { CamelCasePropertyNames = true } }; string path = "local11.db"; var store = new MobileServiceSQLiteStoreWithLogging(path, PCL_AppConstants.bLogSqlLite); store.DefineTable <T>(); await MobileService.SyncContext.InitializeAsync(store); itemsTable = MobileService.GetSyncTable <T>(); }