Compartir a través de


MvcServiceCollectionExtensions.AddMvc Método

Definición

Sobrecargas

AddMvc(IServiceCollection)

Agrega servicios MVC al especificado IServiceCollection.

AddMvc(IServiceCollection, Action<MvcOptions>)

Agrega servicios MVC al especificado IServiceCollection.

AddMvc(IServiceCollection)

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

Agrega servicios MVC al especificado 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

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se van a agregar los servicios.

Devoluciones

que IMvcBuilder se puede usar para configurar aún más los servicios MVC.

Se aplica a

AddMvc(IServiceCollection, Action<MvcOptions>)

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

Agrega servicios MVC al especificado 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

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se van a agregar los servicios.

setupAction
Action<MvcOptions>

Action<T> para configurar el objeto MvcOptions proporcionado.

Devoluciones

que IMvcBuilder se puede usar para configurar aún más los servicios MVC.

Se aplica a