MvcApplicationBuilderExtensions.UseMvc 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
UseMvc(IApplicationBuilder) |
将 MVC 添加到 IApplicationBuilder 请求执行管道。 |
UseMvc(IApplicationBuilder, Action<IRouteBuilder>) |
将 MVC 添加到 IApplicationBuilder 请求执行管道。 |
UseMvc(IApplicationBuilder)
将 MVC 添加到 IApplicationBuilder 请求执行管道。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseMvc(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseMvc (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseMvc : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseMvc (app As IApplicationBuilder) As IApplicationBuilder
参数
返回
完成操作后对此实例的引用。
注解
此方法仅支持属性路由。 若要添加传统路由,请使用 UseMvc(IApplicationBuilder, Action<IRouteBuilder>)。
适用于
UseMvc(IApplicationBuilder, Action<IRouteBuilder>)
将 MVC 添加到 IApplicationBuilder 请求执行管道。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseMvc(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Action<Microsoft::AspNetCore::Routing::IRouteBuilder ^> ^ configureRoutes);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseMvc (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Action<Microsoft.AspNetCore.Routing.IRouteBuilder> configureRoutes);
static member UseMvc : Microsoft.AspNetCore.Builder.IApplicationBuilder * Action<Microsoft.AspNetCore.Routing.IRouteBuilder> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseMvc (app As IApplicationBuilder, configureRoutes As Action(Of IRouteBuilder)) As IApplicationBuilder
参数
- configureRoutes
- Action<IRouteBuilder>
用于配置 MVC 路由的回调。
返回
完成操作后对此实例的引用。