public RegisterPlaceListVM (Page mypage) : base (mypage) { listaPlaces = new TodoItemDatabase ().GetItems ().ToList (); InsertPlace = new Command (() => { MyPage.Navigation.PushAsync (new RegisterPlaceView ()); }); }
protected void InsertPlace () { var banco = new TodoItemDatabase (); var item = new TodoItem { Description = Place.Description, Latitude = Place.Latitude, Longitude = Place.Longitude }; try { var id = banco.SaveItem (item); MyPage.Navigation.PopAsync(); } catch (Exception ex) { Xamarin.Insights.Report (ex,Xamarin.Insights.Severity.Critical); } }