title: How do you add a variable prefix to ASP.Net Core API route?
body: <p>I have a ASP.Net Core API web application.</p>
  
  <p>The controller is defined like this:</p>
  
  <pre><code>[Route("/api/[controller]")]
  [ApiController]
   public class ValuesController : ControllerBase
   {
          // GET api/values
          [HttpGet]
          public ActionResult&lt;IEnumerable&lt;string&gt;&gt; Get()
          {
              return new string[] { "value1", "value2" };
          }
  }
  </code></pre>
  
  <p>I want to be able to call the API with a variable path which denotes the customer.  For example, I'd like to do something like this:</p>
  
  <pre><code>[Route("/[customername]/api/[controller]")]
  [ApiController]
  public class ValuesController : ControllerBase
  {
          // GET api/values
          [HttpGet]
          public ActionResult&lt;IEnumerable&lt;string&gt;&gt; Get()
          {
              // TODO: Somehow get the value of [customername]?
  
              return new string[] { "value1", "value2" };
          }
  }
  </code></pre>
  
  <p>Is this possible?</p>