Condividi tramite


MvcServiceCollectionExtensions.AddMvc Metodo

Definizione

Overload

AddMvc(IServiceCollection)

Aggiunge i servizi MVC all'oggetto specificato IServiceCollection.

AddMvc(IServiceCollection, Action<MvcOptions>)

Aggiunge i servizi MVC all'oggetto specificato IServiceCollection.

AddMvc(IServiceCollection)

Origine:
MvcServiceCollectionExtensions.cs
Origine:
MvcServiceCollectionExtensions.cs
Origine:
MvcServiceCollectionExtensions.cs

Aggiunge i servizi MVC all'oggetto specificato IServiceCollection.

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

Parametri

services
IServiceCollection

Oggetto IServiceCollection in cui aggiungere i servizi.

Restituisce

Oggetto IMvcBuilder che può essere usato per configurare ulteriormente i servizi MVC.

Si applica a

AddMvc(IServiceCollection, Action<MvcOptions>)

Origine:
MvcServiceCollectionExtensions.cs
Origine:
MvcServiceCollectionExtensions.cs
Origine:
MvcServiceCollectionExtensions.cs

Aggiunge i servizi MVC all'oggetto specificato IServiceCollection.

public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvc (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Mvc.MvcOptions> setupAction);
static member AddMvc : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Mvc.MvcOptions> -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddMvc (services As IServiceCollection, setupAction As Action(Of MvcOptions)) As IMvcBuilder

Parametri

services
IServiceCollection

Oggetto IServiceCollection in cui aggiungere i servizi.

setupAction
Action<MvcOptions>

Oggetto Action<T> per la configurazione dell'oggetto MvcOptions fornito.

Restituisce

Oggetto IMvcBuilder che può essere usato per configurare ulteriormente i servizi MVC.

Si applica a