0
我想获得满足某些值的列表的记录。在Linq列表条件
var batch_institute = (from tb in context.tblBatch_Institute
where tb.BatchID == model.BatchID
select tb);
var currentMaxBatchNo = (from tb in context.tblBatches
join tbins in context.tblBatch_Institute on tb.BatchID equals tbins.BatchID
where tb.AcadamicSemester == batch.AcadamicSemester && tb.AcadamicYear == batch.AcadamicYear
&& tb.CampusID == batch.CampusID && tb.FacultyID == batch.FacultyID && tb.IntakeID == batch.IntakeID &&
tb.IntakeYear == batch.IntakeYear && tb.Weekend_Day == batch.Weekend_Day
&& batch_institute.Any(code => tbins.InstituteID.Equals(code))
select tbins);
我觉得我做的第二LINQ查询
batch_institute.Any(code => tbins.InstituteID.Equals(code))
我收到以下错误什么毛病下面的代码。
DbComparisonExpression需要参数相媲美类型