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); }
public ICollection <GroupServiceEntity> GetServicesFromGroup(GroupEntity group) { return(dbContext.UserGroupServices.Where(u => u.GroupID == group.ID).ToList()); }