List<string> strLen = new List<string>();
if (!string.IsNullOrEmpty(group_id))
{
using (ManagementSystemContext ef = new ManagementSystemContext())
{
List<GroupMapUserMapRoler> list = ef.GroupMapUserMapRolers.Where(a => a.group_id == group_id).ToList();
list.ForEach(p =>
{
var mm = ef.tBaseRolerMapPowers.Where(a => a.roler_name.Equals(p.roler_name)).Select(a => a.power_name);
foreach (var item in mm)
{
strLen.Add(item.ToString());
}
});
if (strLen.Count > 0)
strLen.Distinct();
}
}
return string.Join(",", strLen);