public async Task <TaskDetail> SaveAsync(TaskDetail taskDetail) { await ToDoListContext.SaveChangesAsync(); return(taskDetail); }
public void UpdateTask(TaskDetail task) { task.ModifiedOn = DateTime.Now; ToDoListContext.Set <TaskDetail>().Update(task); }
public void DeleteTask(TaskDetail task) { task.ModifiedOn = DateTime.Now; ToDoListContext.Set <TaskDetail>().Remove(task); }
public void AddNewTask(TaskDetail task) { task.CreatedBy = task.ModifiedBy = "CurrentUser"; task.CreatedOn = task.ModifiedOn = DateTime.Now; ToDoListContext.Set <TaskDetail>().Add(task); }