public void EditItem(string name, int score, string word, int id) { try { //http://stackoverflow.com/questions/14007891/how-are-sqlite-records-updated var EditThis = new tblscoring { id = id, name = name, score = score, word = word }; conn.Update(EditThis); //or this // db.Execute("UPDATE tblscoring Set name = ?, score =, WHERE ID = ?", name, score, word, id); } catch (Exception e) { Log.Info(tag, "Update Error:" + e.Message.ToString()); } }
public void AddItem() { //http://javatechig.com/xamarin/using-sqlite-net-orm-in-xamarin-application Log.Info(tag, "AddItem Word = " + Words.Name + " AddItem Score = " + Words.Score + " AddItem Word = " + Words.Word); try { var AddThis = new tblscoring { name = Words.Name, score = Words.Score, word = Words.Word }; conn.Insert(AddThis); // db.Execute("INSERT INTO tblscoring(name, score, word) VALUES(?1,? 2,? 3)) Log.Info(tag, "Data Added " + AddThis); } catch (Exception e) { Log.Info(tag, "Add Error: " + e.Message); } }