I have a route like http://localhost:63037/api/futuresMarginRuns/7/data which is working however another controller API with route http://localhost:63037/api/futuresMarginRuns/2018-07-11/data is not working, even the breakpoint in the controller API is not hit.
Here are the API signatures
[HttpGet]
[Route("/api/futuresMarginRuns/{id}/data")]
public async Task<IActionResult> GetFuturesMarginRunDataAsync(long id)
{
var data = await _repository.GetAllAsync(id).ConfigureAwait(false);
return Ok(data);
}
[HttpGet]
[Route("/api/futuresMarginRuns/{runDate}/data")]
public async Task<IActionResult> GetFuturesMarginRunDataByDateAsync(DateTime runDate)
{
var data = await _repository.GetAllAsync(runDate).ConfigureAwait(false);
return Ok(data);
}
In the first case I get json data but in the second one the breakpoint is not hit so looks like the route is not mapped to the API properly in which case I would expect an error, but i get empty []
How can I the API to work?
Thanks