// Code to insert a record public string InsertRecord(string task) { try { string dbPath = Path.Combine(Environment.GetFolderPath (Environment.SpecialFolder.Personal), "ormdemo.db3"); var db = new SQLiteConnection(dbPath); ToDoTasks item = new ToDoTasks(); item.Task = task; db.Insert(item); return("Record Added..."); } catch (Exception ex) { return("Error : " + ex.Message); } }
// Code to insert a record public string InsertRecord( string task) { try { string dbPath = Path.Combine(Environment.GetFolderPath (Environment.SpecialFolder.Personal), "ormdemo.db3"); var db = new SQLiteConnection(dbPath); ToDoTasks item = new ToDoTasks(); item.Task = task; db.Insert(item); return "Record Added..."; } catch(Exception ex) { return "Error : " + ex.Message; } }