public async Task <bool> SyncAllAsync() { var list = new List <Task <bool> >(); //list.Add(GroupsManager.SyncAsync()); list.Add(PersonManager.SyncAsync()); //list.Add(MembershipManager.SyncAsync()); var successes = await Task.WhenAll(list).ConfigureAwait(false); //var count = MembershipManager.Table.ToListAsync().Result; return(successes.Any(x => !x)); }
public AzureService() { var url = new Uri(Constants.ApplicationURL); var store = new MobileServiceSQLiteStore($"{url.Host}.db"); store.DefineTable <Person>(); store.DefineTable <Groups>(); //store.DefineTable<Membership>(); Client.SyncContext.InitializeAsync(store); PersonManager = new PersonManager(); //MembershipManager = new MembershipManager(); //GroupsManager = new GroupsManager(); }