public ActionResult AddGroup(GroupViewModel vm)
        {
            Group group = new Group
            {
                Active = 1,
                Created = DateTime.Now,
                OwnerId = Convert.ToInt32(GetSUD()),
                Title = vm.Title
            };

            Rep.AddGroup(group);
            Rep.Save();

            foreach (var member in vm.AccessList.Where(e => e.Selected))
            {
                GroupMember gm = new GroupMember
                {
                    AccountId = Convert.ToInt32(member.SimpleId),
                    Active = 1,
                    Created = DateTime.Now,
                    GroupId = group.Id
                };

                Rep.AddGroupMember(gm);
            }

            Rep.Save();

            return RedirectToAction("Index");
        }
        public void UpdateGroup(Group group)
        {
            Group original = GetGroupById(group.Id);

            //context.Group(original).CurrentValues.SetValues(group);

            //Save();
        }
 public void AddGroup(Group group)
 {
     context.Groups.Add(group);
 }