GetUriByAction without HttpContext cannot be used normally.
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
```
test1
```
The code above can build/run well, but not works in the page.

### Expected Behavior
the test1 and test2 should also be a link.

### Steps To Reproduce
1. Create a ASP.NET CORE Razor Page Project
2. Find the index.html and paste the code below.
```
@page
@inject Microsoft.AspNetCore.Routing.LinkGenerator LinkGenerator
@using Microsoft.AspNetCore.Routing
@model IndexModel
@{
ViewData["Title"] = "Home page";
}
Details
```
### Exceptions (if any)
N/A
### .NET Version
.NET 6/7/8
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.