MvcCoreMvcBuilderExtensions.AddControllersAsServices(IMvcBuilder) 方法

定义

将发现的控制器注册为 中的 IServiceCollection服务。

public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddControllersAsServices (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder);
static member AddControllersAsServices : Microsoft.Extensions.DependencyInjection.IMvcBuilder -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddControllersAsServices (builder As IMvcBuilder) As IMvcBuilder

参数

返回

IMvcBuilder

适用于