I have created a class CustomAuthorizeAttribute:AuthorizeAttribute for authorization, but I am unable to authorize in the razor view like @if(User.IsInRole("some role"));, but what I want is @if(CustomAuthorizeAttribute(My Parameters)) for my authorization.
How to do that?