You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In OrdersController on the action GetOrdersByCustomerId I wasn’t get the anything when I was invoking the api. So I put breakpoints on the action, then I conclude that customerId was always 0. Because of [Route("/api/orders/customer/{customer_id}")] the customerId parameter is always 0.
So, changing to [Route("/api/orders/customer/{customerId}")], now I can invoke the api and customerId is properly filed. The action now returns the orders of one specify customerId.
My question is, anyone get this problem or I am doing something wrong? And there is a better way to solve this problem?
If anyone can use this action of this controller without any problems, can you tell me how you are doing the API call, so I can see what I am doing wrong.
The text was updated successfully, but these errors were encountered:
I can also reproduce. I believe Codefans-fan is correct that customerId would be more semantically in line with the rest of the codebase and opened a pull request to fix.
In OrdersController on the action GetOrdersByCustomerId I wasn’t get the anything when I was invoking the api. So I put breakpoints on the action, then I conclude that customerId was always 0. Because of [Route("/api/orders/customer/{customer_id}")] the customerId parameter is always 0.
So, changing to [Route("/api/orders/customer/{customerId}")], now I can invoke the api and customerId is properly filed. The action now returns the orders of one specify customerId.
My question is, anyone get this problem or I am doing something wrong? And there is a better way to solve this problem?
If anyone can use this action of this controller without any problems, can you tell me how you are doing the API call, so I can see what I am doing wrong.
The text was updated successfully, but these errors were encountered: