Create list from related tables in and set it as DataGrid in Devexpress WPF
<p>I am using:</p>

<p>Entityramework 6 Code First 
Devexpress WPF</p>

<p>DBContext:    </p>

<pre><code>    public class Transport
    {
    [Key]
    public int TransportID {get; set;}
    public string Model { get; set; }
    public string Brand { get; set; }
    }

    public class Owner
    {
    [Key]
    public int OwnerID {get; set;}
    public int Name {get; set;}
    }

    public class TransportOwner
    {
    [Key]
    public int TransportOwnerID {get; set;}
    public int TransportID {get; set;}

    [ForeignKey("TransportID")]
    public virtual Transport Transport { get; set; }
    [ForeignKey("OwnerID")]
    public virtual Owner Owner { get; set; }
    }

    public virtual DbSet&lt;Transport&gt; Transports { get; set; }
    public virtual DbSet&lt;Owner&gt; Owners { get; set; }
    public virtual DbSet&lt;TransportOwner&gt; TransportOwners { get; set; }
</code></pre>

<p>I created list:
List TransportOwnerList</p>

<p>What would be a final list witch I can pass to WPF? </p>

<pre><code>var result = dbContext.TransportOwners.AsQueryable();
</code></pre>

<p>I also need to filter data first by TransportID witch value I get from another filtered lists selected item</p>

<pre><code>result = result.Where(tr =&gt; tr.TransportID.Equals(SelectedItem.TransportID));
</code></pre>

<p>So how to format list from Transpot and Owners and set it as dataGrid itemSource?</p>

<p>I need such data:
TransportOwnerID, OwnerID, TransportID, ModelName, BrandName </p>

<pre><code>TransportOwnerList = ... ?
</code></pre>