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)); } }