// GET: Group/Edit/5 public ActionResult Edit(string id) { try { if (IsValidId(id)) { var group = _groupManager.GetGroupById(new ObjectId(id)); if (IsValidGroup(group) && _groupManager.IsGroupOwner(group.Id.ToString(), User.Identity.GetUserId())) { GroupEditViewModel gevm = new GroupEditViewModel { Id = group.Id.ToString(), Description = group.Description, Name = group.Name }; return(View(gevm)); } } } catch (Exception) { return(RedirectToAction("Index", "Home")); } return(RedirectToAction("Index", "Home")); }