[CheckAccessMethod(RouteData.Values["action"].ToString())]
[HttpGet]
public IActionResult Get(){...}
class CheckAccessMethodAttribute : Attribute
{
string MethodName { get; set; }
public CheckAccessMethodAttribute(string methodName)
{
MethodName = methodName;
}
}
我无法获得当前的请求路线。我想为用户创建方法访问逻辑