コード例 #1
0
        public async void Remove(Professor professor)
        {
            bool action = await App.Current.MainPage.DisplayAlert("Atenção", $"Deseja remover o {professor.Name}?", "Sim", "Não");

            if (action)
            {
                await ProfessorRepository.DeleteProfessorAsync(professor.Id);

                await App.Current.MainPage.DisplayAlert("Info", $"{professor.Name} removido com sucesso!", "Ok");
                await LoadProfessors();
            }
        }