IWebHostBuilder.ConfigureServices Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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:
- IWebHostBuilder.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);
public Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureServices (Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext,Microsoft.Extensions.DependencyInjection.IServiceCollection> configureServices);
abstract member ConfigureServices : Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
Public Function ConfigureServices (configureServices As Action(Of WebHostBuilderContext, IServiceCollection)) As IWebHostBuilder
Parameters
- configureServices
- Action<WebHostBuilderContext,IServiceCollection>
A delegate for configuring the IServiceCollection.
Returns
The IWebHostBuilder.
Applies to
ConfigureServices(Action<IServiceCollection>)
- Source:
- IWebHostBuilder.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);
public Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureServices (Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> configureServices);
abstract member ConfigureServices : Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
Public Function ConfigureServices (configureServices As Action(Of IServiceCollection)) As IWebHostBuilder
Parameters
- configureServices
- Action<IServiceCollection>
A delegate for configuring the IServiceCollection.
Returns
The IWebHostBuilder.