 Location = ResponseCacheLocation.None, NoStore = true)]
[IgnoreAntiforgeryToken]
public class BlazorSchoolError : PageModel
{
    public string? RequestId { get; set; }

    public bool ShowRequestId =&gt; !string.IsNullOrEmpty(RequestId);

    private readonly ILogger&lt;BlazorSchoolError&gt; _logger;

    public BlazorSchoolError(ILogger&lt;BlazorSchoolError&gt; logger)
    {
        _logger = logger;
    }

    public void OnGet() =&gt; RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;

 