我有以下 linq:
var result2 = Psl_Pt
.Where(w => w.PaslNum == 33979)
.GroupBy(a => new { a.GroupId })
.Select(a =>
new
{
Publish = a.All(g => g.Publish)
});
什么相当于:
Publish = a.All(g => g.Publish)
从我看到的
.All(g => g.Publish)
方法:
publish = 1
这是选择语句:
select groupid from Psl_Pt
where publish = 1 and paslnum = 33979
group by groupid
请让我知道转换为 sql 是否正确