e getBugsModel = (from bgs in context.Bugs
join cmp in context.Components on bgs.Component_Id equals cmp.ID
join prd in context.Products on bgs.Product_Id equals prd.ID
//LEFT JOIN
join ccl in context.CC on bgs.Bug_Id equals ccl.Bug_Id
into ccltemp
from ccl1 in ccltemp.DefaultIfEmpty()
join prf in context.Profiles on bgs.Assigned_To equals prf.Userid
into prftemp
from prf1 in prftemp.DefaultIfEmpty()
where prf1.Userid == userID
group new { prf1.Login_name }
by new { bgs.Bug_Id, ComponentName = cmp.Name, bgs.Priority, bgs.Creation_Ts, bgs.Bug_Status
,bgs.Short_Desc, ProductName = prd.Name } into grp
select new GetBugsModel
{
BugId = grp.Key.Bug_Id,
ComponentName = grp.Key.ComponentName,
ProductName = grp.Key.ProductName,
Priority = grp.Key.Priority,
Date = grp.Key.Creation_Ts,
BugStatus = grp.Key.Bug_Status,
Description = grp.Key.Short_Desc,
Count = grp.Select(x => x.Login_name).Count()
}).ToList();
Когда я запускаю этот код, появляется ошибка «Неизвестный столбец» bgs0.Reported_Accessible »в« списке полей », я хочу подсчет prf1.Login_name.