Exemple #1
0
        public TaskModel Get(int id)
        {
            TaskModel item = null;

            ToDoDBModel.UsingDb(() => ToDoDBModel.GetDbItem(id, ref item));
            return(item);
        }
Exemple #2
0
        public IEnumerable <TaskModel> Get()
        {
            IEnumerable <TaskModel> dbItems = new TaskModel[0];

            ToDoDBModel.UsingDb(() => ToDoDBModel.GetDBItems(ref dbItems));
            return(dbItems);
        }
Exemple #3
0
 public void DeleteTask(int id)
 {
     ToDoDBModel.UsingDb(() => ToDoDBModel.RemoveDBItem(id));
 }
Exemple #4
0
 public void Post(TaskModel task)
 {
     ToDoDBModel.UsingDb(() => ToDoDBModel.AddToDB(task));
 }