public ActionResult Edit(string userName) { var model = new EditDelegationModel { UserName = userName }; model.Settings = Repository.GetDelegationSettingsForUser(userName); if (model.Settings.ToList().Count == 0) { return(RedirectToAction("Index")); } return(View(model)); }
public ActionResult Edit(string userName) { var model = new EditDelegationModel { UserName = userName }; model.Settings = _repository.GetDelegationSettingsForUser(userName); if (model.Settings.ToList().Count == 0) { return RedirectToAction("Index"); } return View(model); }