public ActionResult Edit(int id) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageResource)) { return(AccessDeniedView()); } var item = _resourcesService.GetEntityById(id); if (item == null) { return(RedirectToAction("List")); } var model = new ResourceModel { Id = item.Id, ResourceType = Convert.ToInt32(item.ResourceType), ResourceTypes = ResourceTypeModel.Instructions.ToSelectList(false).ToList(), }; return(View(model)); }