public async Task <IActionResult> CreateTodoItem([FromBody] CreateTodoItemModel model) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var item = await _service.AddNewTodoItem(model.Description); return(CreatedAtRoute(nameof(GetTodoItemById), new { item.Id }, item)); }