Linq Join Group by 时报Nullable object must have a value.
例如:
from s in subject on ch.SubId equals s.SubId
join gc in (from aq in question
group aq by aq.ChapterId
into gaq
select new
{
Id = gaq.Key,
Count = gaq.Count(),
})
on s.QueId equals gc.Id
into gc2
from gc in gc2.DefaultIfEmpty()
结果将会报错
生成的sql语句符合预期,为简单的join
解决方法:
/// <summary>
/// 解决问题: efcore group new dyn