got the code from this url http://stackoverflow.com/questions/21704505/how-do-i-use-webapi-rest-correctly-when-other-params-are-needed?rq=1
i am new in web api attribute routing
- [Route("customers/{customerId}/orders")]
- public IEnumerable
GetOrdersByCustomer( int customerId) { ... } - or
- [Route("customers/{customerId}/orders/{orderId}")]
- public Order GetOrderByCustomer(int customerId, int orderId) { ... }
how the first and second url will look like please add the same url for both above action ?
thanks
Bhuvanesh MohankumarPosted Apr 25, 2017, 3:42 PM
customers/{customerId}/orders