A parameter transformer changes route parameter text while Razor Pages generates route templates or URLs. A common use is converting PascalCase names such as ProductDetails into kebab-case, such as product-details. section 14.6
Kebab-case transformation
Implement IOutboundParameterTransformer, return null for a null value, and use a regular expression to insert hyphens between lowercase and uppercase letters before lowercasing the result.
Register the transformer through AddRazorPagesOptions and PageRouteTransformerConvention to apply the convention across Razor Pages. RouteOptions separately handles lowercase URLs and trailing slashes.
