title: Get action parameter on OnActionExecuting
body: <p>Using .NET core MVC C#</p>
  <p>I have a controller as:</p>
  <pre><code>[ServiceFilter(typeof(MyCustomFilter))]
  public class HomeController : Controller
  {
      public IActionResult Index(string type)
      {
  
      }
  }
  </code></pre>
  <p>In my filter I want to get the string value of <code>type</code> as it's being passed as a query string.</p>
  <p>And my filter as:</p>
  <pre><code>  [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
  public class MyCustomFilter: ActionFilterAttribute
  {
     public override void OnActionExecuting(ActionExecutingContext filterContext)
      {
            //this is always null
             string id = filterContext.RouteData.Values[&quot;type&quot;].ToString();
      }
  }
  </code></pre>
  <p>Anything I am missing here? Because I have read few posts and they have mentioned the above to do that.</p>