public async void DeleteStewardess() { if (await service.DeleteEntity(SelectedStewardess.Id)) { Stewardesses.Remove(Stewardesses.FirstOrDefault(c => c.Id == SelectedStewardess.Id)); } }
public async void UpdateStewardess() { if (await service.UpdateEntity(SelectedStewardess.Id, SelectedStewardess)) { var tempStewardess = Stewardesses.FirstOrDefault(c => c.Id == SelectedStewardess.Id); tempStewardess.FirstName = SelectedStewardess.FirstName; tempStewardess.LastName = SelectedStewardess.LastName; tempStewardess.Birthday = SelectedStewardess.Birthday; } }