private void InsertIntoDB() { if (Weather == null) { App.Current.MainPage.DisplayAlert("Error", "El Objeto a Insertar esta vacio.", "OK"); return; } try { var history = new WeatherHistoric { City = Weather.location.name, Country = Weather.location.country, LastConsultDate = DateTime.UtcNow }; this.DataContext.Insert(history); } catch (Exception e) { App.Current.MainPage.DisplayAlert("Error", e.Message, "OK"); } }
internal void Update(WeatherHistoric item) { database.UpdateAsync(item).Wait(); }
public void Insert(WeatherHistoric item) { database.InsertAsync(item).Wait(); }