var action = context.ActionDescriptor as ControllerActionDescriptor; var permission = action.MethodInfo.GetCustomAttribute<PermissionAttribute>();
大概就是这样。
asp.net core的授权过滤器中获取action上的Attribute
原文:https://www.cnblogs.com/boxrice/p/11798274.html