public async Task <IActionResult> EditSection(long id) { Section model = await _repository.GetSectionByIdAsync(id); if (model != null) { ViewBag.Title = _stringLocalizer["Edit Section"].ToString(); return(View(model)); } TempData["SectionMessage"] = _stringLocalizer["Selected section was missing"].ToString(); return(RedirectToAction(nameof(Index))); }