Share via


WebHostBuilder.ConfigureServices Method

Definition

Overloads

ConfigureServices(Action<WebHostBuilderContext,IServiceCollection>)

Adds a delegate for configuring additional services for the host or web application. This may be called multiple times.

ConfigureServices(Action<IServiceCollection>)

Adds a delegate for configuring additional services for the host or web application. This may be called multiple times.

ConfigureServices(Action<WebHostBuilderContext,IServiceCollection>)

Source:
WebHostBuilder.cs
Source:
WebHostBuilder.cs
Source:
WebHostBuilder.cs

Adds a delegate for configuring additional services for the host or web application. This may be called multiple times.

public Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureServices (Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext,Microsoft.Extensions.DependencyInjection.IServiceCollection> configureServices);

Parameters

configureServices
Action<WebHostBuilderContext,IServiceCollection>

A delegate for configuring the IServiceCollection.

Returns

The IWebHostBuilder.

Implements

Applies to

ConfigureServices(Action<IServiceCollection>)

Source:
WebHostBuilder.cs
Source:
WebHostBuilder.cs
Source:
WebHostBuilder.cs

Adds a delegate for configuring additional services for the host or web application. This may be called multiple times.

public Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureServices (Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> configureServices);

Parameters

configureServices
Action<IServiceCollection>

A delegate for configuring the IServiceCollection.

Returns

The IWebHostBuilder.

Implements

Applies to