public ActionResult Edit(GroupEditViewModel model) { if (ModelState.IsValid) { try { Group group = _groupManager.GetGroupById(new ObjectId(model.Id)); group.Name = model.Name; group.Description = model.Description; _groupManager.UpdateGroup(group); return(RedirectToAction("Index", "Group", new { id = model.Id })); } catch (Exception) { return(View(model)); } } return(View(model)); }