共用方式為


MvcRazorPagesMvcCoreBuilderExtensions.WithRazorPagesRoot 方法

定義

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

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

參數

rootDirectory
String

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

傳回

適用於