Skip to content

Async IRouteConstraint - IRouter.GetVirtualPath alternative in EndpointRouting? #18883

Closed
@alienwareone

Description

@alienwareone

There should be an async version of Microsoft.AspNetCore.Routing.IRouteConstraint.

Task<bool> MatchAsync(HttpContext httpContext, IRouter route, string routeKey, RouteValueDictionary values, RouteDirection routeDirection)
{
    return await dbContext.Products.Any(x => x.PageName == values[routeKey]);
}

Metadata

Metadata

Assignees

Labels

area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-routinginvestigate

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions