コード例 #1
0
        public async Task <IActionResult> DeleteTodo([FromRoute] int id)
        {
            _logger.LogInformation($"DELETE todo Id : {id}");


            var todo = await _todosService.DeleteTodo(id);

            if (todo == null)
            {
                return(NotFound());
            }
            var todoView = _mapper.Map <TodoView>(todo);

            return(Ok(todoView));
        }