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
Post a Comment