MvcCoreServiceCollectionExtensions Class

Extension methods for setting up essential MVC services in an Microsoft.Extensions.DependencyInjection.IServiceCollection.

Namespace
Microsoft.Extensions.DependencyInjection
Assemblies
  • Microsoft.AspNetCore.Mvc.Core

Syntax

public class MvcCoreServiceCollectionExtensions
class Microsoft.Extensions.DependencyInjection.MvcCoreServiceCollectionExtensions

Methods

AddMvcCore(Microsoft.Extensions.DependencyInjection.IServiceCollection)

Adds essential MVC services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection.

Arguments:services (Microsoft.Extensions.DependencyInjection.IServiceCollection) – The Microsoft.Extensions.DependencyInjection.IServiceCollection to add services to.
Return type:Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
Returns:An Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder that can be used to further configure the MVC services.
public static IMvcCoreBuilder AddMvcCore(this IServiceCollection services)
AddMvcCore(Microsoft.Extensions.DependencyInjection.IServiceCollection, System.Action<Microsoft.AspNetCore.Mvc.MvcOptions>)

Adds essential MVC services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection.

Arguments:
Return type:

Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder

Returns:

An Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder that can be used to further configure the MVC services.

public static IMvcCoreBuilder AddMvcCore(this IServiceCollection services, Action<MvcOptions> setupAction)