首页 > 代码库 > DataTable中Linq查询(where,group by)

DataTable中Linq查询(where,group by)

 

//经理
List<string> jtlist = (from t in jtTable.AsEnumerable()
group t by new
{
t1 = t.Field<string>("JTManager")
} into m
select new
{
JTManager = m.Key.t1
} into c
where !string.IsNullOrEmpty(c.JTManager)
select c.JTManager).ToList();

DataTable中Linq查询(where,group by)