ASP.NET Core UrlHelper and how it works
问题 I'm rather new to ASP.NET Core, and right now I am trying to get a grasp on how UrlHelper works in general. In my controller, I want to create an absolute URL to another action in the same controller, e.g. http://localhost:PORT/api/controller/action . The question is now, how do I do it? I have tried with the following: var urlHelper = new UrlHelper(new ActionContext()); var url = urlHelper.Action("ACTION", "CONTROLLER"); Furthermore, what are those different contexts like ActionContext ? 回答1