public IActionResult CreateDeleteSuggestion(int materialId, string materialName) { var materialToEdit = _service.GetMaterial(materialId); if (materialToEdit == null) { return(RedirectToAction("ResourceNotFound", "Error", new { error = "materiał o podanym Id nie istnieje." })); } ConfigureDeleteSuggestionBreadcrumbs(materialToEdit); var reasons = _service.GetChangeReasons(BLL.Models.ChangeType.DELETE); var vm = new DeleteRequestViewModel { MaterialId = materialId, MaterialName = materialName, Reasons = reasons.ToList() }; return(View(vm)); }