If I have an endpoint
public class OrdersController : ApiController
{
[Route("customers/{customerId}/orders")]
[HttpPatch]
public IEnumerable<Order> UpdateOrdersByCustomer(int customerId) { ... }
}
I can make the calls like this:
http://localhost/customers/1/orders
http://localhost/customers/bob/orders
http://localhost/customers/1234-5678/orders
But what if I want to send a date as part of the query string?
For example I want to send the following: http://localhost/customers/1234-5678/orders?01-15-2019
How can I set my endpoint?
public class OrdersController : ApiController
{
[Route("customers/{customerId}/orders")]
[HttpPatch]
public IEnumerable<Order> UpdateOrdersByCustomer(int customerId, DateTime? effectiveDate) { ... }
}