public async void DeleteEntity(object sender, RoutedEventArgs e) { HideAddAndSaveButtons(); if (TextId.IsReadOnly) { TextId.IsReadOnly = false; } await _pilotService.DeleteEntityAsync(SelectedItem.Id.ToString()); await ReloadEntitiesAsync(); }