I have two tables (TestSets and TestSetMembers) with a many to many relationship defined in an Entity Framework. In other words, one TestSet can have one or more TestSetMembers belonging to it. And one TestSetMember can belong to one or more TestSets.
I can not understand why the following query doesn’t work ( returns an empty set) with the following definition of tsMbrs:
var testSetQuery = (from ts in tsMbrs.TestSets
where tsMbrs.All(tsm => tsm.TestSets.Contains(ts))
At the end of the query testSetQuery is empty. It should have found one TestSet that is used by two different test set members.
I have tried the following queries and have found the proper TestSet.
var tsq1 = (from ts in tsMbrs.TestSets
var tsq2 = (from ts in tsMbrs.TestSets
tsq1 = tsq2 and contain the proper TestSet.
However the following returns an empty set.
var tsq3 = (from ts in tsMbrs.TestSets
The only change between the three above queries are the Index values for
Any help would be appreciated. Thanks.