Exemple #1
0
        public List <GroupEntity> GetGroupsFromListStr(List <string> groups)
        {
            List <GroupEntity> userGroups = new List <GroupEntity>();

            foreach (string groupName_ in groups)
            {
                GroupEntity group = dbContext.Groups.Where(g => g.GroupName == groupName_).FirstOrDefault();

                if (group != null)
                {
                    userGroups.Add(group);
                }
            }

            return(userGroups);
        }
Exemple #2
0
 public ICollection <GroupServiceEntity> GetServicesFromGroup(GroupEntity group)
 {
     return(dbContext.UserGroupServices.Where(u => u.GroupID == group.ID).ToList());
 }