public IActionResult Delete(int?id) { if (id == null) { return(NotFound()); } var taskItem = _taskService.GetItemById(id); if (taskItem == null) { return(NotFound()); } return(View(taskItem)); }