I have a many-to-many query problem in Linq-to-SQL.
I have a table named user
.
User
has got 2 products > join product.UserID
and Product
can be have 2 equipment. Product
to Equipments
have many to many association
I want to get user's equipments:
var match = from c in ctx.Products
where c.UserID == USERID
select c.Equipments;
This code returns IQueryable<System.Data.Objects.DataClasses.EntityCollection<Equipments>>
typed object.
But I want to get IQueryable<Equipments>
typed object. How can I cast?