title: how to get specific fields in asp.net core entity in one to many relationship classes
body: <p>I have 2 classes such as Trail and National park as shown below having one to many relationship
  for ex one NationalPark can have many Trails</p>
  <pre><code> public class Trail
      {
          [Key]
          public int Id { get; set; }
  
          [Required]
          public string Name { get; set; }
  
          [Required]
          public double Distance { get; set; }
          public enum DifficultyType { Easy, Moderate, Difficult, Expert}
          public DifficultyType Difficulty { get; set; }
  
          [Required]
          public int NationalParkId { get; set; }
          [ForeignKey(&quot;NationalParkId&quot;)] 
  
          public NationalPark NationalPark { get; set; }
          public DateTime DateCreated { get; set; }
      }
  
   public class NationalPark
  
      {
          [Key]
          public int Id { get; set; }
          [Required]
          public string Name { get; set; }
          [Required]
          public string State { get; set; }
          public DateTime Created { get; set; }
          public byte[] Picture { get; set; }
          public DateTime Established { get; set; }
      }
  </code></pre>
  <p>By using the below code I am getting every field in NationalPark class as shown below</p>
  <pre><code> public Trail GetTrail(int trailId)     
  {
  
              return _db.Trails.Include(c =&gt; c.NationalPark).FirstOrDefault(a =&gt; a.Id == trailId);
  
  }
  </code></pre>
  <p>this is the result</p>
  <pre><code>[ 
  {
      &quot;id&quot;: 1,
      &quot;name&quot;: &quot;Trail1,Np3&quot;,
      &quot;distance&quot;: 114,
      &quot;difficulty&quot;: 2,
      &quot;nationalParkId&quot;: 3,
      &quot;nationalPark&quot;: {
        &quot;id&quot;: 3,
        &quot;name&quot;: &quot;Test2&quot;,
        &quot;state&quot;: &quot;MP&quot;,
        &quot;created&quot;: &quot;2008-10-11T13:23:44&quot;,
        &quot;picture&quot;: null,
        &quot;established&quot;: &quot;2002-10-11T13:23:44&quot;
      }
  
  ]
  </code></pre>
  <p>I wanted to avoid the &quot;picture&quot; field in the above result, please help
  Thanks in Advance</p>