title: How to get current model in action filter
body: <p>I have a generic action filter, and i want to get current model in the <code>OnActionExecuting</code> method. My current implementation is like below:</p>
  
  <pre><code>public class CommandFilter&lt;T&gt; : IActionFilter where T : class, new()
  {
      public void OnActionExecuting(ActionExecutingContext actionContext)
      {
          var model= (T)actionContext.ActionArguments["model"];
      }
  }
  </code></pre>
  
  <p>It works well if my all model names are same. But i want to use differnet model names. </p>
  
  <p>How to solve this problem?</p>
  
  <p><strong>Edit</strong> </p>
  
  <pre><code>public class HomeController : Controller
  {
      [ServiceFilter(typeof(CommandActionFilter&lt;CreateInput&gt;))]
      public IActionResult Create([FromBody]CreateInput model)
      {
          return new OkResult();
      }
  }
  </code></pre>