title: How to pass an array of objects through a query string and read them in asp.net Controller
body: <p>I am building an API to generate Invoice Number.</p>
  <p>I have the following <code>InvItem</code> class</p>
  <pre><code>public class InvItem
  {
      public string ItemCode;
      public double Quantity;
      public double SaleValue;
  }
  </code></pre>
  <p>I have the following Controller method</p>
  <pre><code>    [Route(&quot;api/InvoiceMaster/GetInvoiceNum&quot;)]
      [HttpGet]
      public IActionResult GetInvoiceNum(            
          string xDateTime,
          string BuyerName,
          double TotalBillAmount,            
          InvItem[] items
          )
      {
  
  
          ...
          var invItems = new List&lt;InvItem&gt;();
          invItems.AddRange(items);
          ...
          return Ok();            
      }
  </code></pre>
  <p>Invoice can have one or more items. Now I want to call that method from postman (or any other application) using <code>GET</code> request.</p>
  <p>I have already built that method using <code>POST</code> request and reading parameters from request body. But the requirement here is STRICTLY Get Request.</p>
  <p>I have tried the following url but <strong>cannot get the value of items</strong> in controller's action method 'GetInvoiceNum'</p>
  <pre><code>https://localhost:44365/api/InvoiceMaster/GetInvoiceNum?xDateTime=2020-01-01 12:00:00&amp;BuyerName=elon&amp;TotalBillAmount=1519&amp;items[0].ItemCode=001897&amp;items[0].Quantity=1&amp;items[0].SaleValue=19&amp;items[1].ItemCode=002899&amp;items[1].Quantity=1&amp;items[1].SaleValue=1500
  </code></pre>
  <p>How can I pass this array of objects to api?</p>