title: nested where query in Entity Framework
body: <p>i have a class like this</p>
  
  <pre><code>public class Survey
      {
          public Survey()
          {
              SurveyResponses=new List&lt;SurveyResponse&gt;();
          }
  
          public Guid SurveyId { get; set; }
  
          public string SurveyName { get; set; }
  
          public string SurveyDescription { get; set; }
  
          public virtual ICollection&lt;Question&gt; Questions { get; set; }
  
          public virtual ICollection&lt;SurveyResponse&gt; SurveyResponses { get; set; }
      }
  </code></pre>
  
  <p>and a Question class like this</p>
  
  <pre><code> public class Question
      {
  
          public Guid QuestionId { get; set; }
  
          public string QuestionText { get; set; }
  
          public QuestionType QuestionType { get; set; }
  
          public virtual ICollection&lt;Option&gt; Options { get; set; }
  
          public bool IsOtherAllowed { get; set; }
  
          public virtual ICollection&lt;Answer&gt; Answers { get; set; }
  
      }
  </code></pre>
  
  <p>i want to write a query to select a survey which contains a particular question</p>
  
  <p>something along these lines</p>
  
  <pre><code> Survey s1 = db.Surveys.Where(s =&gt; s.Questions.Where(q =&gt; q.QuestionId == "1eb56610-853d-4a9e-adc7-e0ec069390b7"));
  </code></pre>