我有以下代码从县表中选择给定 stateid 的所有县。
Public Shared Function GetCountiesfromState(statename As String) As List(Of String)
Dim context As New Model.teckEntities()
Dim query = From c In context.counties Where c.stateId = 7 Select c
Return query.ToList()
End Function
我收到查询返回模型列表的任何错误。关于错误所在的任何想法?