PageConventionCollection.AddPageRouteModelConvention Method       
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates and adds an IPageRouteModelConvention that invokes an action on the PageRouteModel for the page with the specified name.
public:
 Microsoft::AspNetCore::Mvc::ApplicationModels::IPageRouteModelConvention ^ AddPageRouteModelConvention(System::String ^ pageName, Action<Microsoft::AspNetCore::Mvc::ApplicationModels::PageRouteModel ^> ^ action);public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention AddPageRouteModelConvention(string pageName, Action<Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel> action);member this.AddPageRouteModelConvention : string * Action<Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel> -> Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConventionPublic Function AddPageRouteModelConvention (pageName As String, action As Action(Of PageRouteModel)) As IPageRouteModelConventionParameters
- pageName
- String
The name of the page e.g. /Users/List
- action
- Action<PageRouteModel>
The Action.
Returns
The added IPageRouteModelConvention.