public void AddItem(string name, int score) { try { SQLiteConnection db = database(); var AddThis = new tblscores() { Name = name, Score = score }; db.Insert(AddThis); } catch (Exception e) { Console.WriteLine("Add Error: " + e.Message); } }
public void EditItem(string name, int score, int id) { try { SQLiteConnection db = database(); var EditThis = new tblscores() { Name = name, Score = score, Id = id }; db.Update(EditThis); //or this //db.Execute("UPDATE tblscores Set") } catch (Exception e) { Console.WriteLine("Update Error: " + e.Message); } }