title: How To Return only Child Model property in wep api response
body: <p>here Is my Models  ,here in my model PK is decorated  with Key becoz  in EF it must be . But as it is aslo available in base class. if I removed PK from Person it gives error as model has not assign a Key IN EF which is strange to me . </p>
  
  <pre><code>public class Person:TBase
  {
      [Key]
      public long PK { get; set; }
      public string NAME { get; set; }
      public string ADDRESS { get; set; }
  
  }
  
   public class TBase: Base
  {
      public virtual long? FKTenant { get; set; }
      public virtual bool IsDefault { get; set; }
  
  }
  
   public class  Base
  {
      [Key]
       public long PK { get; set; }
       public virtual string GlobalID { get; set; }
  
  }
  </code></pre>
  
  <p>and Controller </p>
  
  <pre><code>[EnableQuery]
      public IHttpActionResult Get()
      {
          try
          {
             IQueryable&lt;Person&gt; result;
              var  result = DbContext.Persons.Where(x =&gt; x.FKTenant == context.FKTenant).ToList(); 
              return Ok(result);
          }
          catch (Exception ex)
          {
              return BadRequest(ex.Message);
          }
  
      }
  </code></pre>
  
  <p>i am getting response in postman is </p>
  
  <pre><code>"value": [
      {
          "@odata.etag": "W/\"bnVsbA==\"",
          "PK": 1001,
          "NAME": "VIVEK",
          "ADDRESS": "DELHI",
          "FKTenant":null,
          "IsDefault ":null,
          "GlobalID ":null
  
      }]
  </code></pre>
  
  <p>But my Intention  to get ouput response as below which should contain onlly name and address </p>
  
  <pre><code>"value": [
      {
          "@odata.etag": "W/\"bnVsbA==\"",
          "NAME": "VIVEK",
          "ADDRESS": "DELHI"
      }]
  </code></pre>
  
  <p>Any guide will  be appreciable.</p>