IRouteValueProvider Interface

<p> A metadata interface which specifies a route value which is required for the action selector to choose an action. When applied to an action using attribute routing, the route value will be added to the Microsoft.AspNetCore.Routing.RouteData.Values when the action is selected. </p> <p> When an Microsoft.AspNetCore.Mvc.Routing.IRouteValueProvider is used to provide a new route value to an action, all actions in the application must also have a value associated with that key, or have an implicit value of <code>null</code>. See remarks for more details. </p>

Namespace
Microsoft.AspNetCore.Mvc.Routing
Assemblies
  • Microsoft.AspNetCore.Mvc.Core

Syntax

public interface IRouteValueProvider
interface Microsoft.AspNetCore.Mvc.Routing.IRouteValueProvider

Properties

Microsoft.AspNetCore.Mvc.Routing.IRouteValueProvider.RouteKey

The route value key.

Return type:System.String
string RouteKey { get; }
Microsoft.AspNetCore.Mvc.Routing.IRouteValueProvider.RouteValue

The route value. If <code>null</code> or empty, requires the route value associated with Microsoft.AspNetCore.Mvc.Routing.IRouteValueProvider.RouteKey to be missing or <code>null</code>.

Return type:System.String
string RouteValue { get; }