我想显示其accountid,id匹配并且还显示不同记录的记录。
var result = from a in cxt.tblInventoryProducts
where a.aid == accID && a.id == id
select new
{
a.productType,
a.productName
};
提前致谢
答案 0 :(得分:3)
像
这样的东西var result = from a in cxt.tblInventoryProducts
where a.aid == accID && a.id == id
group a by new { a.productType, a.productName } into grp
select new
{
grp.Key.productType,
grp.Key.productName
};