I want to create a Url
that I can email that goes to an action within a controller, passing to the action an Id and a Token. This is my code so far:
var action = new UrlActionContext
{
Action = "Verify",
Controller = "Auth",
Values = id, token
};
var url = UrlHelperExtensions.Action(action);
UrlHelperExtensions.Action
is expecting an IUrlHelper
however, and I have not been able to get this to work using that interface. Can someone please explain how I am able to form a Url
that goes to this action?
I can only seem to find solutions to Asp.Net MVC projects, whereas I am using Asp.Net Core 2.0.