title: Razor Pages Partial Views with routing
body: <p>I'd like to have Razor Pages as partial views but also being able to get them separately as HTML fragments so I can update them with AJAX.</p>
  
  <p>If I put a <code>@page</code> at the top of my partial view, it gets routed but its model object will be <code>null</code>. If I remove <code>@page</code>, the model will be valid however I can no longer GET the partial view separately.</p>
  
  <p>How can I have the cshtml be routed <strong>and</strong> have a valid model at the same time? I'm on ASP.NET Core 2.1 and upgrading is unfortunately not an option.</p>