Public Function GetSubjectList(ci As CultureInfo, EACode As String) As IEnumerable(Of SelectListItem)
Dim items
Dim innerQuery = (From c In _context.TblSchoolDatas
Where c.EACODE = EACode And c.AnalystedStudents >= 10
Select (c.SubjectID)).Distinct()
items = From s In _context.TblSubjects
Where innerQuery.Contains(s.SubjectID)
Order By s.Ordering
Select New SelectListItem With {.Text = s.ShortNameE, .Value = s.SubjectID}
**items.Insert(0, New SelectListItem() With {.Text = "All", .Value = "All"})**
Return items
End Function
未找到类型“DbQuery(Of SelectListItem)”上的公共成员“插入”。 错误以粗体显示,谢谢
再提供一张调试屏幕截图供您参考