.net core 3.0 web app with razorpages and api
My api controllers are in a folder "/api" and one of them has a default Get method that I want to call with both a route parameter AND 2 other values
[HttpGet("{customer}")]
public IActionResult Get(string customer, string size, string color)
Trying to route using a parameter to a path like this
http get localhost://site-root/api/mycontroller/ABC?size=val1&color=val2
Where "ABC" would get mapped to a route parameter "customer" in my controller
but this wont route.
... in configured routing in Startup
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapControllerRoute(name: "api", pattern: "api/[controller]/[action]");
endpoints.MapRazorPages();
});