public ActionResult Edit(GroupEditModel model) { try { var group = new Group { Id = new Identity(model.Group.Id), Name = model.Group.Name, Description = model.Group.Description, ParentId = model.Group.ParentId == null ? new Identity?() : new Identity(model.Group.ParentId) }; updateGroupCommand.Execute(group); return(RedirectToAction("Index")); } catch (Exception e) { ModelState.AddModelError(Guid.NewGuid().ToString(), e); } model.GroupList = GetGroupList(new Identity(model.Group.Id)); return(View(model)); }
public HttpResponseMessage Update(Identity id, Facade.GroupPut group) { return(ProcessPut(() => { var instance = group.ToModel(); updateGroupCommand.Execute(instance); })); }