title: ASP.Net Core Web API Controller action with many parameters
body: <p>I have ASP.Net Core Web API Controller's method that returns <code>List&lt;Car&gt;</code> based on query parameters.</p>
  
  <pre><code>[HttpPost("cars")]
  public async Task&lt;List&lt;Car&gt;&gt; GetCars([FromBody] CarParams par)
  {
      //...
  }
  </code></pre>
  
  <p>Parameters are grouped in record type <code>CarParams</code>. There are about 20 parameters:</p>
  
  <pre><code>public class CarParams
  {
      public string EngineType { get; set; }
      public int WheelsCount { get; set; }
      /// ... 20 params
      public bool IsTruck { get; set; }
  }
  </code></pre>
  
  <p>I need to change this method from POST to GET, because I want to use a server-side caching for such requests.</p>
  
  <p>Should I create a controller's method with 20 params?</p>
  
  <pre><code>[HttpGet("cars")]
  public async Task&lt;List&lt;Car&gt;&gt; GetCars(string engineType, 
                                        int wheelsCount, 
                                    /*...20 params?...*/
                                           bool isTruck)
  {
      //...
  }
  </code></pre>
  
  <p>If this is the case: Is there a way to automatically generate such a complex URL for a client-side app?</p>