MvcCoreMvcCoreBuilderExtensions.AddControllersAsServices 方法

定义

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

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

参数

返回

IMvcCoreBuilder

适用于