title: Inherit routing from baseapi controller base to deriver controller
body: <p>I am using .NET Core 3.0 Web API, I have a situation where I have set the prefix in the baseapicontroller and also set the route in the derived controller, theoretically I thought that it would work like "<strong>baseapicontroller route/derived controller route</strong>" but it is not working like that, .net core picks only the derived class route and ignore the baseapicontroller route.</p>
  
  <p>I have tried to use the attribute "<strong>Route</strong>" and "<strong>RoutePrefix</strong>", it is still the same.</p>
  
  <pre><code>[ApiController]
  [RoutePrefix("api/v1")]
  //[Route("api/v1")]
  public class BaseApiController : ControllerBase
  {
  }
  </code></pre>
  
  <p>derived controller</p>
  
  <pre><code>[Route("testing-route")]
  public class TestRouteController : BaseApiController
  {
      [HttpGet]
      public string test()
      {
  
          return "";
      }
  }
  </code></pre>
  
  <p>I want the URL to be "<strong>api/v1/testing-route/test</strong>", I don't want to repeat <strong>api/v1</strong> in every controller. and also I know people might say that I can use "<strong>api/v1/[controller]/[action]</strong>" but that is not my requirement. I want to use the custom route for the controller.</p>
  
  <p>Looking forward to get any good answers.</p>
  
  <p>Thanks</p>