Exemplo n.º 1
0
 public IActionResult Create([FromBody] TodoList todoList)
 {
     if (todoList == null)
     {
         return(BadRequest());
     }
     if (repository.AddTodoList(todoList))
     {
         return(CreatedAtRoute("GetTodo", new { id = todoList.Id }, todoList));
     }
     else
     {
         return(new StatusCodeResult(409));
     }
 }