public async Task <IActionResult> Update([Required] string id) { var result = await _services.GetAsync(id); if (result.IsValid) { return(View(_mapper.Map <UpdateChildrenViewModel>(result.Result))); } TempData["ErrorsList"] = result.ErrorsList; return(View()); }
// GET: Children/Details/5 public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var child = await _childrenService.GetAsync(id.Value); if (child == null) { return(NotFound()); } return(View(child)); }