vb.net - linq to sql return only match based on ID -


i using vb.net , have 2 list. want return ones have match based on ids tempproduct2. linq incorrect, there way linq sql?

dim newlist list(of product) dim tempproduct1 list(of product) dim tempproduct2 list(of product)   newlist = (from p1 in tempproduct1             tempproduct2 (of ?).contains(p2.id)            select p1).tolist() 

yes, can use linq any method that, in:

newlist = (from p1 in tempproduct1            tempproduct2.any(function(x product) x.id = p1.id)            select p1).tolist() 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -