title: Asp.net core WebAPI route with optional parameter only not working
body: <p>I'm trying to create a GET-Route which takes 4 optional Parameter. There are no required Parameter.</p>
  <p>My Route looking like that</p>
  <pre><code>    [Produces(&quot;application/json&quot;)]
      [HttpGet(&quot;SearchWhatever&quot;, Name = &quot;GetWhatever&quot;)]
      public IEnumerable&lt;TmpObject&gt; SearchWhatever(long? eid= null, long? pid = null, string name= null,  string firstname= null)
      {
          //do Smth
      }
  </code></pre>
  <p>Basically the &quot;eid&quot; and the &quot;pid&quot; are working as intended, they're completely optional. However the strings are not working as &quot;optional&quot;.</p>
  <p>If I'm calling the API like &quot;../SearchWhatever?eid=6610232513694&quot; I'll receive the following error:</p>
  <pre><code>{
  errors: {
  name: [
  &quot;The name field is required.&quot;
  ],
  firstname: [
  &quot;The firstname field is required.&quot;
  ]
  },
  type: &quot;https://tools.ietf.org/html/rfc7231#section-6.5.1&quot;,
  title: &quot;One or more validation errors occurred.&quot;,
  status: 400,
  traceId: &quot;00-e4eb5dc9bb266e44abda734d6a411e44-5f5a40de7fc10540-00&quot;
  }
  </code></pre>
  <p>How do I achieve my goal? Is it even possible? I thought giving a string a default value like null makes the parameter optional already.</p>
  <p>Thanks in advance</p>