I found something that seems strange to me.
the following code:
Public Shared Function FindPart(ByVal searchString As String) As PartEntity()
Dim meta As New metadata(New adapter)
Dim q = From p In meta.Part _
Where p.PartDescription.Contains(searchString) _
Or (p.PartNumber.Contains(searchString)) _
Select p
q = q.WithPath(New PathEdge(Of MaterialEntity)(PartEntity.PrefetchPathMaterials))
Return q.ToArray
End Function
Produces this error:
An exception was caught during the execution of a retrieval query: An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Add a name or single space as the alias name. . Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception.
However when I change Or to OrElse it works fine. I looked in the documentation and didn't see mention of "Or" not being supported.
Am I doing something wrong? or is OrElse what I should be using?