/// <summary> /// Store an updated SettingsModel in the database. /// </summary> public void SaveSettings(SettingsModel settings) { InitDatabase(); conn.InsertOrReplace(settings); DatabaseChangeListeners?.Invoke(); }
/// <summary> /// Save a new PastSession or update an existing PastSession in the /// database. /// </summary> public int SaveSession(PastSession session) { InitDatabase(); int retval; if (session.ID != 0) { retval = conn.Update(session); } else { retval = conn.Insert(session); } DatabaseChangeListeners?.Invoke(); return(retval); }