MvcCoreMvcBuilderExtensions.AddControllersAsServices(IMvcBuilder) Method

Definition

Registers discovered controllers as services in the 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

Parameters

builder
IMvcBuilder

The IMvcBuilder.

Returns

The IMvcBuilder.

Applies to