title: How To Get Url Parameter Routing Working in ASP.NET Core
body: <p>The default routing for my ASP.NET Core is as defaulted by VS2015 to be:</p>
  
  <pre><code>routes.MapRoute(
     name: "default",
     template: "{controller=Home}/{action=Index}/{id?}");
  </code></pre>
  
  <p>When I make my request URL /my-controller/my-special-view it indeed calls the method in my my-control that is defined as follows with the id parameter equal to my-special-value</p>
  
  <pre><code>public IActionResult my-controller(string id) {...
  </code></pre>
  
  <p>I'm trying to the same thing with attribute routing.  I define the attribute as follows:</p>
  
  <pre><code>[Route("my-controller/{id}")]
  public IActionResult my-controller(string id) {...
  </code></pre>
  
  <p>I get an error as follows:</p>
  
  <pre><code>InvalidOperationException: The constraint entry 'attributeOfInterest' - 'string' on the route 'CacheTagHelper/{attributeOfInterest:string}' could not be resolved by the constraint resolver of type 'DefaultInlineConstraintResolver'.
  </code></pre>
  
  <p>I'm not experienced with attritube routing and do not understand why the above to controller methods don't give me the same results.</p>