public async Task <Aeroplane> UpdateAeroplaneAsync( int id, [FromBody] Aeroplane aeroplane, CancellationToken ct ) { return(await _aeroplaneServices.UpdateAsync(aeroplane, ct)); }
private async void UpdateAeroplane() { try { var resultItem = await _service.UpdateAsync(SelectedAeroplane); Aeroplanes.Remove(SelectedAeroplane); Aeroplanes.Insert(0, resultItem); } catch (System.InvalidOperationException ex) { await _dialogService.ShowMessage(ex.Message, "Error"); } }