private async void QueryCommandExecute() { var watch = System.Diagnostics.Stopwatch.StartNew(); var sqliteResult = await _sqliteService.GetAll(); watch.Stop(); Log += $"SQLite: QUERY 1000 items in {watch.ElapsedMilliseconds} milliseconds\n"; watch.Restart(); var realmResult = _realmService.GetAll(); watch.Stop(); Log += $"Realm: QUERY 1000 items in {watch.ElapsedMilliseconds} milliseconds\n"; }
private async void RefreshAllItems() { var result = await _sqliteService.GetAll(); Items = new ObservableCollection <RecipeItem>(); foreach (var item in result) { Items.Add(item); } }
public override async void OnAppearing(object navigationContext) { base.OnAppearing(navigationContext); var result = await _sqliteService.GetAll(); Items = new ObservableCollection <TodoItem>(); foreach (var item in result) { Items.Add(item); } }
public async Task <List <TBusiness> > GetAllAsync() { try { var entityList = await _dataService.GetAll <TEntity>(); if (entityList.Any()) { return((from entity in entityList let business = new TBusiness() select MappingHelper.ConvertToModel(entity, business)).ToList()); } } catch (Exception ex) { LogOrThrow(ex); } return(new List <TBusiness>()); }