public ViewResult Index() { var model = new AccessGroupIndexModel(); try { model.AllAccessGroups = _accessGroupService.GetAllAccessGroups(); return(View("Index", model)); } catch (Exception) { model.AllAccessGroups = new List <AccessGroup>(); ViewData["Message"] = "Feil under henting av tilgangsgrupper."; return(View("Index", model)); } }
public ViewResult Index() { var model = new AccessGroupIndexModel(); try { model.AllAccessGroups = _accessGroupService.GetAllAccessGroups(); return View("Index", model); } catch (Exception) { model.AllAccessGroups = new List<AccessGroup>(); ViewData["Message"] = "Feil under henting av tilgangsgrupper."; return View("Index", model); } }