I created a custom attribute and I need to pass a value from route to this attribute, how can I do this?
public class MyAttribute : Attribute
{
public MyAttribute(string myvalue)
{
// use myvalue...
}
}
[MyAttribute]
[Route("/action/{myvalue}")]
public IActionResult Action(string myvalue)
{
}