MvcServiceCollectionExtensions.AddMvc Método

Definição

Sobrecargas

AddMvc(IServiceCollection)

Adiciona serviços MVC ao especificado IServiceCollection.

AddMvc(IServiceCollection, Action<MvcOptions>)

Adiciona serviços MVC ao especificado IServiceCollection.

AddMvc(IServiceCollection)

Origem:
MvcServiceCollectionExtensions.cs
Origem:
MvcServiceCollectionExtensions.cs
Origem:
MvcServiceCollectionExtensions.cs

Adiciona serviços MVC ao 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

O IServiceCollection ao qual adicionar serviços.

Retornos

Um IMvcBuilder que pode ser usado para configurar ainda mais os serviços MVC.

Aplica-se a

AddMvc(IServiceCollection, Action<MvcOptions>)

Origem:
MvcServiceCollectionExtensions.cs
Origem:
MvcServiceCollectionExtensions.cs
Origem:
MvcServiceCollectionExtensions.cs

Adiciona serviços MVC ao 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

O IServiceCollection ao qual adicionar serviços.

setupAction
Action<MvcOptions>

Um Action<T> para configurar o MvcOptions fornecido.

Retornos

Um IMvcBuilder que pode ser usado para configurar ainda mais os serviços MVC.

Aplica-se a