title: How to receive multiple object parameters in GET Action in ASP.NET Core 2.2 REST API?
body: <p>I have common scenario where I want to list some items in web client app (I am using vue.js and axios) that are fetched from the backend (asp.net core 2.2 REST application). The client should pass some filtering and pagination options to the backend in order to get items it needs to display on the current page. </p>
  
  <p>However, the problem I have is that GET action defined on server Controller can't deserialize parameters passed to it from HTTP request.</p>
  
  <p>Here is the backend code:</p>
  
  <pre class="lang-cs prettyprint-override"><code>// these are classes that represent parameters sent in HTTP Get request
  public class Filter
  {
      public bool IsActive { get; set; }
      public string Name { get; set; }
  }
  
  public class Pagination
  {
      public string Page { get; set; }
      public string ItemsPerPage { get; set; }
  }
  </code></pre>
  
  <p>This is the action in controller:</p>
  
  <pre class="lang-cs prettyprint-override"><code>[HttpGet]
  public IActionResult GetItems([FromQuery]Filter filter, [FromQuery]Pagination pagination)
  {
      // ... get items from db with specified filter and pagination
      return Ok();
  }
  </code></pre>
  
  <p>Here is the axios get request from the client:</p>
  
  <pre class="lang-js prettyprint-override"><code>axios.get('https://localhost:44336/api/items', {
    params: {
      filter: {
        isLive: true,
        name: 'test123'
      },
      pagination: {
        page: 5,
        itemsPerPage: 10
      }
    }
  })
  </code></pre>
  
  <p>Notice that I use axios params to specify two nested objects, one filter and other pagination. This doesn't work and parameters passed to GetItems() action are objects with default values (eg. isLive=false, name=null, page=0, itemsPerPage=0...)</p>
  
  <p>Is there a way to make this work and have two separate objects passed and properly deserialized by GetItems() action?</p>