For example the original route is localhost:5000/Product
When I use app.UsePathBase("/admin")
will cause the route localhost:5000/admin/Product
working.
But the original route localhost:5000/Product
still working.
I expected it not enabled and I may use it for Front-end routing. How to disable it.
Refer to existing answer.
So I decided to use the simple solution [Route("admin/[controller]")] It does not seem clever, but it solves my problem.