Tuesday, April 14, 2015

There is such a thing as attribute routing in ASP.NET MVC.

This has the following example which I bet behaves just as you'd expect...

[Route("customers/{customerId}/orders")]
public IEnumerable<Order> GetOrdersByCustomer(int customerId) {
... }

No comments:

Post a Comment