共用方式為


MvcRazorPagesMvcBuilderExtensions.WithRazorPagesRoot 方法

定義

將 Razor Pages 設定為使用指定的 rootDirectory

public static Microsoft.Extensions.DependencyInjection.IMvcBuilder WithRazorPagesRoot (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, string rootDirectory);
static member WithRazorPagesRoot : Microsoft.Extensions.DependencyInjection.IMvcBuilder * string -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function WithRazorPagesRoot (builder As IMvcBuilder, rootDirectory As String) As IMvcBuilder

參數

rootDirectory
String

要作為根目錄的應用程式相對路徑。

傳回

IMvcBuilder

適用於