i am trying to get the results of products from database by matching them with the product id stored in List Of(Orders)
but then they gave me some error on the last line saying : "Only arguments that can be evaluated on the client are supported for the String.Contains method."
whats the problem here O.O? (newbie to VB, sorry if this seems stupid)
but then they gave me some error on the last line saying : "Only arguments that can be evaluated on the client are supported for the String.Contains method."
whats the problem here O.O? (newbie to VB, sorry if this seems stupid)
Code:
Dim idString As String = ""
For Each item In order
idString &= item.ProductId & " "
Next
Dim rs = From p In db.Products
Where idString.Contains(p.ProductId)
dgvOrder.DataSource = rs