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