// Not in use for now--old method used to add members to a group //public void AddMember(UserGroupDTO userGroup) //{ // UserGroup dbUserGroup = new UserGroup() // { // GroupId = userGroup.GroupId, // UserId = _uRepo.GetUser(userGroup.UserName).First().Id // }; // _groupRepo.AddMember(dbUserGroup); //} public IList <UserGroupDTO> GetGroupsForUser(string currentUser) { return((from ug in _ugRepo.GetGroupsForUser(currentUser) select new UserGroupDTO() { GroupId = ug.Group.Id, GroupName = ug.Group.Name, UserName = currentUser }).ToList()); }