예제 #1
0
        public void UpdateTodo(int id, ToDoUpdate item)
        {
            var todo = _toDoRepository.GetById(id);

            todo.Title    = item.Title;
            todo.DeadLine = Convert.ToDateTime(item.DeadLine);
            todo.EndDate  = Convert.ToDateTime(item.EndDate);
            _toDoRepository.Update(todo);
        }
예제 #2
0
 public IActionResult Update([FromRoute] int id, [FromBody] ToDoUpdate todo)
 {
     _toDoService.UpdateTodo(id, todo);
     return(Ok());
 }