public void Update(Task task) { db.Tasks.UpdateById(task); }
//inserting the id is problematic, but against SQLite Simple.Data does not return the row we inserted, //and we want to know to test integration. Trick might be to rewrite with a different Db. internal void Add(int id, Task newTask) { db.Tasks.Insert(id:id, taskname: newTask.TaskName, taskdescription: newTask.TaskDescription, DueDate: newTask.DueDate); }
public void Add(Task newTask) { db.Tasks.Insert(taskname: newTask.TaskName, taskdescription: newTask.TaskDescription, DueDate: newTask.DueDate); }
private static Task GetTask() { return foundTask ?? (foundTask = dao.FindById(newTask.Id)); }