Partager via


MvcServiceCollectionExtensions.AddMvc Méthode

Définition

Surcharges

AddMvc(IServiceCollection)

Ajoute les services MVC au spécifié IServiceCollection.

AddMvc(IServiceCollection, Action<MvcOptions>)

Ajoute les services MVC au spécifié IServiceCollection.

AddMvc(IServiceCollection)

Source:
MvcServiceCollectionExtensions.cs
Source:
MvcServiceCollectionExtensions.cs
Source:
MvcServiceCollectionExtensions.cs

Ajoute les services MVC au spécifié 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

Paramètres

services
IServiceCollection

IServiceCollection auquel ajouter les services.

Retours

IMvcBuilder qui peut être utilisé pour configurer davantage les services MVC.

S’applique à

AddMvc(IServiceCollection, Action<MvcOptions>)

Source:
MvcServiceCollectionExtensions.cs
Source:
MvcServiceCollectionExtensions.cs
Source:
MvcServiceCollectionExtensions.cs

Ajoute les services MVC au spécifié 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

Paramètres

services
IServiceCollection

IServiceCollection auquel ajouter les services.

setupAction
Action<MvcOptions>

Action<T> pour configurer le MvcOptions fourni.

Retours

IMvcBuilder qui peut être utilisé pour configurer davantage les services MVC.

S’applique à