title: How to route to api/values?id=1&type=2
body: <p>I am working with .net core 2.1 web api. I have a ValuesController and routes such as api/values/5 &amp; api/values/ work fine. But now I would like to route to something like api/values?id=5&amp;type=2. Is it possible to have a route like this?  </p>
  
  <p>I have searched stackoverflow and other sites but haven't found a way to do this. I tried with the code below, but doesn't work.</p>
  
  <pre><code>    [Route("api/[controller]")]
      [ApiController]
      public class ValuesController : ControllerBase
      {
          // GET api/values
          [HttpGet]
          public ActionResult&lt;IEnumerable&lt;string&gt;&gt; Get()
          {
              return new string[] { "value1", "value2" };
          }
  
          // GET api/values/5
          [HttpGet("{id}")]
          public ActionResult&lt;string&gt; Get(int id)
          {
              return "value" + id;
          }
  
          [HttpGet]
          public ActionResult&lt;string&gt; Get(int id, int type)
          {
              return "value: " + id + "with type: " + type;
          }
      }
  </code></pre>
  
  <p>I would like to route as api/values?id=5&amp;type=2 or api/values/id=5&amp;type=2</p>