title: LINQ - get all answers from all questions in one result
body: <p>I'm trying to retrieve this from a LINQ-query:</p>
  
  <pre><code> Question 1 - Answer 1
              - Answer 2 (Selected)
              - Answer 3
  
   Question 2 - Answer 1
              - Answer 2
              - Answer 3 (Selected)
   etc..
  </code></pre>
  
  <p>My tables look like this:</p>
  
  <pre><code>Question (with attached multilang support which I'll leave out for now)
  QuestionAnswer
  Answer (also with multilang)
  Response (where the user's response is kept (aka which answer he took -&gt; a specif QuestionAnswer row)
  Questionnaire (where all the questionanswers for a single questionnaire are kept)
  </code></pre>
  
  <p>I've tried the following, but I get an exception saying that .ToList() can't be translated into a stored proc when I run it (so at Excecution time, not at compile time) (note this is translated):</p>
  
  <pre><code>(from culture in DbContext.Culture    
  from questionanswer in DbContext.QuestionAnswer
  join questionnaire in DbContext.Questionnaire on questionanswer .QuestionnaireID equals questionnaire.QuestionnaireID 
  
  where culture.TwoLetterISO.Equals(cultureCode) &amp;&amp;
      questionnaire.QuestionnaireID == id
  
  select new QuestionnaireSectionInformation()
  {   
      // Additional data is retrieved here, but thats not important for this question
       Questions = 
          ((from question in DbContext.Question
             join qmultilang in DbContext.QuestionMultiLang on question.ID equals qMultiLang.Id
             join response in DbContext.Response on questionanswer.ID equals response.questionanswerId into possibleReponse
  
             where question.ID == questionanswer.QuestionID &amp;&amp;
                 qMultiLang.CultureId == culture.ID
             select new Topic()
             {
                 Question = qMultiLang.Vraag,
                 Opmerking = possibleResponse.Any() ? possibleResponse.FirstOrDefault().Commentaar : null,
                 Answers= 
                  ((from answer in DbContext.Answer
                    join aMultiLang in DbContext.AnswerMultiLang on answer.ID equals aMultiLang.Id
                    where aMultiLang.CultureId == culture.ID
                    select new Answer()
                    {
                       Answer= aMultiLang.Answer,
                       Selected = possibleAnswer.Any()
                    }).ToList())
             }).ToList())
  }).ToList();
  </code></pre>
  
  <p>I'm trying to learn some more LINQ, that's why I'm not pulling this apart (by just retrieving the data and extracting the questions and answers out of it).</p>
  
  <p>so the problem is: I get an exception saying that .ToList() can't be translated into a stored proc when I run it. How can I get all the child elements of the questions if I can't call .ToList() on them?</p>