title: How to return all properties with return type an interface, where the interface has inherited from another interface
body: <p>I have Interfaces</p>
  <pre><code>public interface IfooBase{
      public int Id {get;set;}
      public string FirstName {get;set;}
      public string LastName {get;set;}
  }
  public interface Ifoo : IfooBase{    
      public string Email {get;set;}
  }
  </code></pre>
  <p>and</p>
  <pre><code>public class Foo: Ifoo {
      public int Id {get;set;}
      public string FirstName {get;set;}
      public string LastName {get;set;}
      public string Email {get;set;}
  }
  </code></pre>
  <p>My controller is following</p>
  <pre><code>[ApiController]
  public class FooController : ControllerBase
  {
      [HttpGet(Name = &quot;GetFoo&quot;)]
      public async Task&lt;ObjectResult&gt; Get()
      {
          Ifoo fooObject= new Foo();
          fooObject.Id = 1;
          fooObject.FirstName = &quot;Jack&quot;;
          fooObject.LastName = &quot;Reacher&quot;;
          fooObject.Email = &quot;Jack.Reacher@gmail.com&quot;;
          return StatusCode(200, fooObject);
      }
  }
  </code></pre>
  <p>Response:</p>
  <pre><code>{
      Email : &quot;Jack.Reacher@gmail.com&quot;
  }
  </code></pre>
  <p>when I return an object of Ifoo type from the dotnet core's web api controller the only thing i get in response is
  Email.</p>
  <p>I dont know whats causing this. any help will be appreciated.</p>