Hi Guys,
I am having an issue with a Linq Query I am using where it is returning more objects than I am actually starting off with.
this is the scenario I have and the code example
Dim arrs As IEnumerable(Of Entity.myObj) = From x In myOBJ.obj _
From x2 In x.stringList Where compareList.Contains(x2.str) _
Select x
myOBJ.obj is a list of objects and within each obj there is a list of strings (stringList) and compareList is also a list of strings that I use to compare against the stringList.
MY problem
I am getting a duplicate myOBj.Obj returned. I am unsure why it is duplicating the return and would be grateful of any help, as to why the WHERE clause compare returning a duplicate of the structure.
I hope that is clear enough.
Thanks for any help
I am having an issue with a Linq Query I am using where it is returning more objects than I am actually starting off with.
this is the scenario I have and the code example
Dim arrs As IEnumerable(Of Entity.myObj) = From x In myOBJ.obj _
From x2 In x.stringList Where compareList.Contains(x2.str) _
Select x
myOBJ.obj is a list of objects and within each obj there is a list of strings (stringList) and compareList is also a list of strings that I use to compare against the stringList.
MY problem
I am getting a duplicate myOBj.Obj returned. I am unsure why it is duplicating the return and would be grateful of any help, as to why the WHERE clause compare returning a duplicate of the structure.
I hope that is clear enough.
Thanks for any help