如下:var categories =
from p in db.Products
group p by new
{
p.CategoryID,
p.SupplierID
}
into g
select new
{
g.Key,
g
};再加上一个表 buyer,变成这样:var categories =
from p in Products
join t0 in buyer on p.bid equals t0.bid into et0
from dt0 in et0.DefaultIfEmpty()
group p by new
{
p.CategoryID,
p.SupplierID,
t0.buyer
} into g
select new
{
g.Key,
g
};我想要在select new{},再查出buyer中的buyer名称的,,select new{}里头该怎么写?
from p in db.Products
group p by new
{
p.CategoryID,
p.SupplierID
}
into g
select new
{
g.Key,
g
};再加上一个表 buyer,变成这样:var categories =
from p in Products
join t0 in buyer on p.bid equals t0.bid into et0
from dt0 in et0.DefaultIfEmpty()
group p by new
{
p.CategoryID,
p.SupplierID,
t0.buyer
} into g
select new
{
g.Key,
g
};我想要在select new{},再查出buyer中的buyer名称的,,select new{}里头该怎么写?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货