title: passing an array to a asp net core web api action method HttpGet
body: <p>I am trying to send an array of integers to my action method the code looks like so:</p>
  
  <pre><code>[HttpGet]
      public async Task&lt;IActionResult&gt; ServicesByCategoryIds([FromQuery] int[] ids)
      {
          var services = await _accountsUow.GetServiceProfilesByCategoryIdsAsync(ids);
          return Ok(services);
      }
  </code></pre>
  
  <p>I call the method like so: <a href="https://localhost:44343/api/accounts/servicesbycategoryids?ids=1&amp;ids=2" rel="noreferrer">https://localhost:44343/api/accounts/servicesbycategoryids?ids=1&amp;ids=2</a></p>
  
  <p>but always get en empty array when I call this method even tho I pass the ids in the query string. I am using .net core 2.1. </p>
  
  <p>everything I have googled suggests that this is in fact the way this is done. . . 
  is there something I am missing here?</p>
  
  <p>Thank you!</p>