private async Task CreateNewTask() { var lastData = TodoItems.LastOrDefault(); if (_connectivity.IsConnected && !string.IsNullOrWhiteSpace(NewTaskValue)) { _crudTodotTable.InsertOrUpdate(new TodoItem { Id = (lastData?.Id ?? 0) + 1, Name = NewTaskValue, LastUpdated = DateTime.Now }); NewTaskValue = string.Empty; IsBusy = true; try { await _crudTodotTable.PushAsync(); } catch (Exception ex) { await _dialogService.DisplayAlertAsync("", "No Internet!", "Ok"); } IsBusy = false; } await LoadTasks(); }