title: How can I return the contents of a collection inside a class using LINQ?
body: <p>I have the following classes:</p>
  
  <pre><code>public partial class Application
  {
      public Application()
      {
          this.TestAccounts = new List&lt;TestAccount&gt;();
      }
      public int ApplicationId { get; set; }
      public string Name { get; set; }
      public virtual ICollection&lt;TestAccount&gt; TestAccounts { get; set; }
  }
  public partial class TestAccount
  {
      public TestAccount()
      {
          this.Subjects = new List&lt;Subject&gt;();
      }
      public int TestAccountId { get; set; }
      public string Name { get; set; }
      public int ApplicationId { get; set; }
  }
  </code></pre>
  
  <p>In my code I have the following which returns <code>IQueryable&lt;Application&gt;</code> with one record.</p>
  
  <pre><code>var applications = DbSet.Where(a =&gt; a.ApplicationId == applicationId)
  </code></pre>
  
  <p>How can I change this so that it returns: <code>ICollection&lt;TestAccount&gt;</code></p>