Compile error when calling ToList() when accessing many to many with Linq To Entities?

It looks like your query is returning a sequence of entity collections - a list of lists of entities, as it were. If you want to flatten them. You're trying to convert it into just a list of entities.

Now, how do you want to do that? Do you want to flatten all the collections into one big list? Or take the first entry from each collection?

Here's an example which will flatten the results: public IList GetRelationshipMembers(int relId) { var members = from r in _container. ObjectRelationships where r. Id == relId select r.

WObjects; return members. SelectMany(x => x) .ToList(); }.

That worked, and makes sense. Thanks! – KallDrexx May 12 '10 at 3:45.

It looks like your query is returning a sequence of entity collections - a list of lists of entities, as it were. If you want to flatten them. You're trying to convert it into just a list of entities.

Now, how do you want to do that? Do you want to flatten all the collections into one big list?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions