private async void UpdatePilot() { try { var resultItem = await _service.UpdateAsync(SelectedPilot); Pilots.Remove(SelectedPilot); Pilots.Insert(0, resultItem); } catch (System.InvalidOperationException ex) { await _dialogService.ShowMessage(ex.Message, "Error"); } }
public async Task UpdateAsync(Pilot ob) { await _pilotService.UpdateAsync(ob); await UpdateListAsync(); }