I am trying to join a table and list in LINQ. From the posts in stackoverflow, I know that you cannot select from a table and list using a join - that you should use .contains. But when I use .contains, I get the same error. What else am I missing? Am I trying to do what Linq will not support? Should I just write a support function that will cycle through daily entries at a time (eliminating the need for a connection)?
This is my code:
Dim count = (from sqlRec in mydatacontext.table, listItem in myList where _ sqlRec.guidIdField.ToString.contains(listItem.IdProperty.toString select sqlRec).count
It gives the same error that I tried to fix, which reads: "The local sequence cannot be used in LINQ to SQL implementations of query operators except the Contains statement."
I am trying to do this (of course, the syntax below will not work):
(from sqlRec in table, listItem in List where sqlRec.guid=listId.Id select sqlRec).count
source share