public async void DeletePilot() { if (await service.DeleteEntity(SelectedPilot.Id)) { Pilots.Remove(Pilots.FirstOrDefault(c => c.Id == SelectedPilot.Id)); } }
public async void UpdatePilot() { if (await service.UpdateEntity(SelectedPilot.Id, SelectedPilot)) { var tempPilot = Pilots.FirstOrDefault(c => c.Id == SelectedPilot.Id); tempPilot.FirstName = SelectedPilot.FirstName; tempPilot.LastName = SelectedPilot.LastName; tempPilot.Birthday = SelectedPilot.Birthday; tempPilot.Experience = SelectedPilot.Experience; } }