title: Inherited razor page OnPostAsync - Multiple handlers matched
body: <p>I have encountered an issue with my new test project when I inherit a razor page from another.
  So I had an editor page and I wanted to use the same flow just with gave an extra param (id), the code was:</p>
  
  <pre><code>public class EditModel : BaseModel
  {
      public EditModel() 
      {
      }
  
      public Task&lt;IActionResult&gt; OnPostAsync(int id)
      {
          ...
      }
  }
  
  public class CreateModel : EditModel
  {
      public CreateModel()
      {
  
      }
  
      public Task&lt;IActionResult&gt; OnPostAsync()
      {
          ...
      }
  }
  </code></pre>
  
  <p>Also I defined the editor cshtml as:</p>
  
  <pre><code>@page "{id:int}"
  ...
  </code></pre>
  
  <p>and the create cshtml as:</p>
  
  <pre><code>@page
  ...
  </code></pre>
  
  <p>I would expect that the routing was obvious cuz editor's parameter is NOT optional, but create does not need a parameter, but I got the error: </p>
  
  <blockquote>
    <p>Multiple handlers matched</p>
  </blockquote>
  
  <p>If I define parameter in create page model too it starts working with 0 value.</p>
  
  <p>I have two questions about that:</p>
  
  <p><strong>Can I define a routing template where I can explicitly forbid the parameter (and how) to avoid ambiguity?</strong> (Now I'm using default routing template.)</p>
  
  <p><strong>Shoud I avoid this kind of inheritance of razor pages?</strong> I can except that if it is by design and use another way to do it.</p>
  
  <p>I would like to mention that I know I can define another handler methods different from default onget/onpost/etc and use it this way, however I think the above problem should work properly if I can define the routing in a good way.</p>