I have the following code to select all counties given a stateid from a counties table.
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
I get any error that query is returning a list of model. any thoughts on where the error lies?
Where c.stateId = 7 Select c.Nameetc. Or return the whole country listGetCountiesfromState(statename As String) As List(Of Country)