public async Task <IActionResult> EditAsync(long id) { if (!ModelState.IsValid) { return(RedirectToAction(nameof(Index))); } var todoItem = await _todoClient.GetItemAsync(id); if (todoItem == null) { return(NotFound()); } return(View(todoItem)); }