PageConventionCollection.AddFolderRouteModelConvention 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 PageRouteModel instances for all page under the specified folder.
public:
Microsoft::AspNetCore::Mvc::ApplicationModels::IPageRouteModelConvention ^ AddFolderRouteModelConvention(System::String ^ folderPath, Action<Microsoft::AspNetCore::Mvc::ApplicationModels::PageRouteModel ^> ^ action);
public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention AddFolderRouteModelConvention (string folderPath, Action<Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel> action);
member this.AddFolderRouteModelConvention : string * Action<Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel> -> Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention
Public Function AddFolderRouteModelConvention (folderPath As String, action As Action(Of PageRouteModel)) As IPageRouteModelConvention
Parameters
- folderPath
- String
The path of the folder relative to the Razor Pages root. e.g. /Users/
- action
- Action<PageRouteModel>
The Action.
Returns
The added IPageApplicationModelConvention.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for