In Razor Pages startup.cs we can create endpoints with
startup.cs
app.UseEndpoints(endpoints => { endpoints.Map("/endpoint", async context =&