public static void Save(PositionApiRequest position) { using (SQLiteConnection con = new MyTrapDB().GetConnection()) { con.Insert(position); } }
public static void Save(string key, string value) { Preference preference = GetByKey(key); using (SQLiteConnection con = new MyTrapDB().GetConnection()) { if (preference != null) { preference.Value = value; con.Update(preference); } else { preference = new Preference() { Key = key, Value = value }; con.Insert(preference); } } }