码迷,mamicode.com
首页 > 编程语言 > 详细

C# 数组 之间转换

时间:2016-12-23 18:37:32      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:add   distinct   select   equals   turn   emc   转换   where   name   

  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);

C# 数组 之间转换

标签:add   distinct   select   equals   turn   emc   转换   where   name   

原文地址:http://www.cnblogs.com/ln-qiqi/p/6215626.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!