日期:2014-05-20 浏览次数:20960 次
select DISTINCT VOD_VodOrder.* from VOD_VodOrder join VOD_VodOrderItem on VOD_VodOrder.Id = VOD_VodOrderItem.ParentId where .....
var dd=from t1 in VodOrders join t2 in VodItems on t1.Id equals t2.ParentId where... select ... ; dd = dd.Distinct();
------解决方案--------------------
给你一个参考吧
var varQnum = from pRow in dttRuleData.AsEnumerable()
where pRow.Field<string>("NODE_TYPE") == GetLinqQuery(FlowRule.C_TYPE_N)
group pRow by pRow.Field<string>("NODE_VALUE")
into g
select new
{
g.Key,
nodeCode = g.Count()
};
------解决方案--------------------
var result = r1 from vod_vodorder
join r2 from vod_vodorderitem on r1.id eauals r2.id
where r1.fileld<string >("creatorid") = 变量 &&
r1.fileld<int>("iscompleted") = 变量 &&
r1.fileld<string>("remarks") = 变量 &&
r2.fileld<int>("moveid") = 变量
select new
{
id = r1.files<string>("id"),
creatorid = r1.fileld<int>("creatorid") ,
iscompleted =r1.fileld<int>("iscompleted"),
remarks = r1.fileld<int>("remarks"),
createdate = r1.fileld<datetime>("createdate")
}.distince().tolist();