title: in DBML, how to get child table with specific fields rather than all fields
body: <p>We are using SQL Server and application is developed with <strong>DBML</strong>. Now due to the functionality of eager loading I am having an issue. I have a <strong>table A</strong> which have relationship with <strong>table B</strong>. (<em>A -> B</em>). Now when I try to load table A, it will get all fields of table B. Culprit is such that table B is having 2-3 columns which is very heavy, contains <code>byte array</code> data and due to those column it takes too much load for getting data of table A also.</p>
  
  <p><strong>Question</strong> <br>
  Can I have such way that I can load only few columns (not all columns) of table B when I am getting table A?</p>
  
  <p><strong>What I have tried</strong><br>
  I am getting this error :</p>
  
  <blockquote>
    <p>The expression specified must be of the form p.A, where p is the
    parameter and A is a property or field member.</p>
  </blockquote>
  
  <p>when I tried with below code -</p>
  
  <pre><code>DataContext2.DeferredLoadingEnabled = false;
  DataLoadOptions options = new DataLoadOptions();
  options.LoadWith&lt;A&gt;(x =&gt; x.Campaign);
  options.LoadWith&lt;A&gt;(x =&gt; x.AnotherTable);
  options.LoadWith&lt;A&gt;(x =&gt; x.B.Select(o =&gt; new B
  {
      Id = o.Id,
      Name = o.Name,
      Person = o.Person,
  }).ToList());
  DataContext2.LoadOptions = options;
  </code></pre>