private async void OnAddButton(Agenda contact) { await App.Current.MainPage.DisplayAlert("Registro Exitoso", "El contacto ha sido agregado ", "OK"); await App.Current.MainPage.Navigation.PushAsync(new HomePage()); contact = new Agenda(Name, Number); Agendas.Add(contact); }
public bool add(Modelo prEntity) { try { Agenda Entity = (Agenda)prEntity; Agendas.Add(Entity); return(SaveChanges() > 0); } catch (Exception e) { return(false); } }