Use MVC Router to determine if route exists
问题 Is it possible to use the ASP.NET Core MVC Router to determine, if a redirect to a specific location might be successfull? I'd like to inject the MVC Router and just ask it, if the route I want to use exists at all, but I'm struggling finding the correct classes to inject and did not see any method of use in the MVCRouter. I would also be okay in overriding the default router and extend it with the neccessary methods. 回答1: One way to do this would be to inject IActionSelector to your