title: How to override generic method from my own bascontroller class
body: <p>I have a base controller class, <code>MyBaseController</code>. How can I override the methods in another controller class which inherits from <code>MyBaseController</code>? The view model is different in every controller.</p>
  <pre><code>public class MyBaseController&lt;T&gt; : ControllerBase where T : class
  {
      public VsBaseController()
      {
      }
  
      [HttpGet]
      public virtual async Task&lt;IActionResult&gt; GetAsync([FromQuery] string QueryParams)
      {
          return null;
      }
  
      [HttpDelete(&quot;{id}&quot;)]
      public virtual async Task&lt;IActionResult&gt; DeleteAsync(int id)
      {
          return null;
      }
  
      [HttpPost]
      [ServiceFilter(typeof(ValidationFilter))]
      protected virtual async Task&lt;IActionResult&gt; CreateAsync(T ViewModel)
      {
          return null;
      }
  
      [HttpPut]
      public virtual async Task&lt;IActionResult&gt; UpdateAsync(T ViewModel, int Id)
      {
          return null;
      }
  }
  </code></pre>
  <p>In the descendent controller, I have the following code:</p>
  <pre><code>[HttpPost]
  public override async Task&lt;IActionResult&gt; CreateAsync(MyViewModel ViewModel)
  {
      var Response = await _MyService.New(ViewModel);
      return Response;
  }
  </code></pre>
  <p>And when building the app I get the following error:</p>
  <blockquote>
  <p>CS0115: no suitable method found to override</p>
  </blockquote>