Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
Web API: Need to understand a web api attribute routing
tri_inn
7y
286
1
Reply
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<Order> GetOrdersByCustomer(
int
customerId) { ... }
or
[Route(
"customers/{customerId}/orders/{orderId}"
)]
public
Order GetOrderByCustomer(
int
customerId,
int
orderId) { ... }
what is the meaning of 1st and 2nd route ?
how the first and second url will look like please add the same url for both above action ?
thanks
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
SMS Gateway for bulk smsing
How to save or download excel file on server location in ASP