title: How to tell if an attribute call is originated from Controller vs. Action
body: <p>When an action filter is called, is there any way to determine whether this call is originated from an attribute applied at controller level or action level?</p>
  
  <p>I need myAttribute to be run for all of my action methods. The Delete action method, however, is specifically annotated with the filter so myAttribute is called twice. I need the call originated from Controller to do nothing or potentially do different things in that case.</p>
  
  <p>Is there anyway to do this without actually removing the [myAttribute] from controller?</p>
  
  <pre><code>[myAttribute]
  public class HomeController
  {
      public ViewResult Index()
      {
      }
  
      public ViewResult View()
      {
      }
  
      public ViewResult Edit()
      {
      }
  
      [myAttribute]
      public ViewResult Delete()
      {
  
      }
  }
  </code></pre>
  
  <p>I am using these action filters to authorize a user. A user could have access to a controller but if a method specifically demands permission (by having [myAttribute] above it), then controller level access is not enough and that action should be explicitly mentioned in user permissions.</p>