📅  最后修改于: 2022-03-11 14:55:49.735000             🧑  作者: Mango
services.AddMvc()
.AddRazorPagesOptions(options =>
{
options.Conventions.AddAreaFolderRouteModelConvention("Identity", "/Account/", model =>
{
model.Selectors.ForEach(x =>
{
if (x.AttributeRouteModel.Template.StartsWith("Identity"))
{
x.AttributeRouteModel = new AttributeRouteModel()
{
Order = -1,
Template = AttributeRouteModel.CombineTemplates(("{culture=en-US}"),
x.AttributeRouteModel.Template)
};
}
});
});
});