I'm getting this error when I issue this:
The command parameter syntax '@0' is not valid. Near line 6, column 37.
xWhereis a string containing value
"(ProjectStatuses.Any(DepartmentID = @0))"
Dim parameterList As New List(Of ObjectParameter)
It contains one element with value 1 of type Int32 which corresponds to the type of DepartmentID.
I got it. I was using the dunamic.vb from an external assembly. In my code I had imports statement for that assembly, but I also needed the imports for system.linq.dynamic