title: Entity Framework returning distinct records after join
body: <p>Consider we have these two entities and one custom object : </p>
  
  <pre><code>    public class  Entiy1
  {
      public int Id { get; set; }
      public int DestinationId { get; set; }
      public string Name { get; set; }
      public string JobTitle { get; set; }
  }
  
  public class Entiy2
  {
      [Key]
      public int DestinationId { get; set; }
      public int DestinationName { get; set; }
  
  
  }
  public class EntityDTO
  {
      public int DestinationName { get; set; }
      public int DestinationId { get; set; }
      public string Name { get; set; }
      public string JobTitle { get; set; }
  }
  </code></pre>
  
  <p>Data is something like this :</p>
  
  <blockquote>
    <p>Entity1 : <br> Id=1 , DestinationId=1,Name=Name1,JobTitle=Job1<br>
    Id=2 , DestinationId=1,Name=Name2,JobTitle=Job2<br> Id=3 ,
    DestinationId=2,Name=Name3,JobTitle=Job3<br> Id=4 ,
    DestinationId=2,Name=Name4,JobTitle=Job4<br> Id=5 ,
    DestinationId=2,Name=Name5,JobTitle=Job5<br>
    Entity 2:<br>
    DestinationId=1 , DestinationName=Destination1<br>
    DestinationId=2 , DestinationName=Destination2</p>
  </blockquote>
  
  <p>How can I select distinct destinationId and select Name and JobTitle from Entity1 then join them with Entity2  to fetch destination name and returning them as EntityDTO ? </p>