title: How to create an object from datareader from two tables (sql statemens)
body: <p>I have two classes <code>Car</code> and <code>Drivers</code>:</p>
  
  <pre><code>public class Car
  {
      public string Status { get; set; }
      public IList&lt;Driver&gt; Event { get; set; }
  }
  
  public class Driver
  {
      public string Name { get; set; }
      ....
  }
  </code></pre>
  
  <p>I get the values from TWO SQL-Statemens (e.g. Select * from car; select * from driver). I can fill the first one with:</p>
  
  <pre><code>while (rdr.Read())
  {
      _results.Add(new TaskModel(rdr));
      //new TaskModel(rdr); 
  }
  </code></pre>
  
  <p>where <code>_results</code> is:</p>
  
  <pre><code>private ObservableCollection&lt;Car&gt; _results = new ObservableCollection&lt;Car&gt;();
  </code></pre>
  
  <p>Constructor for Car looks like:</p>
  
  <pre><code>public Car(IDataRecord record)
  {
      this.CarId = Convert.ToInt32(record["CARID"]);
      this.Color = (string)record["COLOR"];
  }
  </code></pre>
  
  <p>I'm asking myself how to fill the datareader with two statemens and refer in the constructor to get the whole object (Car with Driver)</p>