title: .Net Core Override Controller Route for Generic Controller
body: <p>I'm writing a RestFramework and I'm trying to figure out how I can allow the users to create a custom name for a generic controller.  I'm registering my generic controllers like so:</p>
  
  <pre><code>public class GenericControllerFeatureProvider : IApplicationFeatureProvider&lt;ControllerFeature&gt;
  {
      public void PopulateFeature(IEnumerable&lt;ApplicationPart&gt; parts, ControllerFeature feature)
      {
          foreach (var entityConfig in _entityConfigurations)
          {
              var entityType = entityConfig.Type;
              var typeName = entityType.Name + "Controller";
              if (!feature.Controllers.Any(t =&gt; t.Name == typeName))
              {
                  var controllerType = typeof(GenericController&lt;&gt;)
                      .MakeGenericType(entityType.AsType())
                      .GetTypeInfo();
  
                 //Normally I would expect there to be an overload to configure the controller name
                 //feature.Controllers.Add(controllerType, entityConfig.ControllerName);
              }
          }
      }
  }
  </code></pre>
  
  <p>How ever I need to figure out a way that I can override the route for the controllers.  The only information about this in the documentation shows how to create a controller convention like so:</p>
  
  <pre><code>public class GenericControllerNameConvention : Attribute, IControllerModelConvention
  {
      public void Apply(ControllerModel controller)
      {
          if (controller.ControllerType.GetGenericTypeDefinition() != 
          typeof(GenericController&lt;&gt;))
          {
              return;
          }
  
          var entityType = controller.ControllerType.GenericTypeArguments[0];
          controller.ControllerName = entityType.Name;
      }
  }
  </code></pre>
  
  <p>This will not work since it is done at compile time.  I need user to be able to override the controller name on Startup,  How can I Achieve this?</p>