title: How to pass null value to nullable types in WebAPI
body: <p>I have a function as below:</p>
  
  <pre><code>        [HttpGet]
          [Route("Departments/{departmentid}/employeeByDeptId")]
          [ResponseType(responseType: typeof(IList&lt;Employee&gt;))]
          public HttpResponseMessage GetDetailsByDeptId(int departmentId, DateTime? sinceDate)
          {
              if (!ModelState.IsValid)
              {
                  return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
              }
  
              var detailInfo = _employeeManager.GetDetailInfo(departmentId, sinceDate ?? _sinceDate);
  
              return CreateHttpResponseMessage(detailInfo);
  
          }
  </code></pre>
  
  <p>I have made sinceDate as Nullable type in declaration so that if null value is passed it takes the date which is there in '_sinceDate' variable declared locally.
  Now how can I pass null value to sinceDate parameter while making an API call.</p>
  
  <p>When I pass below url:
  <a href="http://localhost:26754/v1/EmployeeMgnt/Departments/4/employeeByDeptId?sinceDate=2020-03-03" rel="nofollow noreferrer">http://localhost:26754/v1/EmployeeMgnt/Departments/4/employeeByDeptId?sinceDate=2020-03-03</a></p>
  
  <p>I get the desired result. 
  Now I want to pass sinceDate as null. I tried
  <a href="http://localhost:26754/v1/EmployeeMgnt/Departments/4/employeeByDeptId?sinceDate=null" rel="nofollow noreferrer">http://localhost:26754/v1/EmployeeMgnt/Departments/4/employeeByDeptId?sinceDate=null</a>
  <a href="http://localhost:26754/v1/EmployeeMgnt/Departments/4/employeeByDeptId?sinceDate" rel="nofollow noreferrer">http://localhost:26754/v1/EmployeeMgnt/Departments/4/employeeByDeptId?sinceDate</a> isnull</p>
  
  <p>All gave bad request error. Please tell how can I assign null value to sinceDate in API call?</p>