title: Razor Pages .NET Core 2.1 Child Routes
body: <p>I'm working on a .NET Core 2.1 Razor Pages application, and can't figure out why the router isn't matching my expectations.  In my application an Orchestration object has a collection of Rules objects.  An Orchestration is defined queried at the DB with a Guid.</p>
  
  <p>My Index.cshtml in the Orchestration folder looks like</p>
  
  <pre><code>@page "{id:guid}"
  @model Website.Pages.Orchestration.OrchestrationModel
  </code></pre>
  
  <p>and predictably <code>localhost/Orchestration/{guid}</code> routes to the correct page.</p>
  
  <p>My goal is <code>localhost/Orchestration/{guid}/rule/{ruleId}/edit</code> to hit the Edit.cshtml in the Rule folder.  My attempts are close, but .NET is matching <code>Orchestration/rule</code> instead of <code>Orchestration/{guid}/rule</code>.  I've tried several incantations trying to add <code>{orchestrationid}/{id}</code> to my Edit.cshtml in the Rule directory, but it's not working.  This seems possible, I appreciate any help on what I'm missing.</p>
  
  <p><em>note rule/Index.cshtml has been renamed to Edit</em>  </p>
  
  <p>The Edit.cshtml file looks like </p>
  
  <pre><code>@page "{id}"
  @model Website.Pages.Orchestration.Rule.RuleModel
  </code></pre>
  
  <p>The part that doesn't working is trying to access the child routes</p>
  
  <p><a href="https://i.stack.imgur.com/dRvFp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dRvFp.png" alt="enter image description here"></a></p>