public async void EditarProfessor(Professor professor) { if (string.IsNullOrWhiteSpace(professor.Nome) || string.IsNullOrWhiteSpace(professor.Titulo)) { await App.Current.MainPage.DisplayAlert("Ooops!", "O item selecionado não é válido!", "Ok"); return; } var result = await ProfessorRepository.PutProfessorSqlAzureAsync(professor); if (result) { await App.Current.MainPage.DisplayAlert("Sucesso!", "Professor editado com sucesso!", "Ok"); await App.Current.MainPage.Navigation.PopAsync(); return; } await App.Current.MainPage.DisplayAlert("Oops!", "Ocorreu um erro ao editar o professor!", "Ok"); }