public async Task <IActionResult> Edit([FromRoute] int id) { var supermarket = await supermarketRepository.GetSupermarketWithCategories(id); ViewBag.Categories = new SelectList(await categoryRepository.GetCategories(), "Id", "Description", null); TempData["modalTitle"] = "Confirmation"; TempData["modalText"] = "Are you sure you want to remove the Supermarket Category?"; return(View(supermarket)); }