Class ServiceCollectionExtensions

Extends Microsoft.Extensions.DependencyInjection.IServiceCollection with extension methods to add dependencies for MVC support

Inheritance
System.Object
ServiceCollectionExtensions
Namespace: EPiServer.Web.Mvc
Assembly: EPiServer.Cms.AspNetCore.Mvc.dll
Version: 12.0.3
Syntax
public static class ServiceCollectionExtensions : Object

Methods

AddCmsMvc(IServiceCollection)

Adds the services required by the Episerver platform to an Microsoft.Extensions.DependencyInjection.IServiceCollection. Call this method in your startup configuration method when you want use the Episerver platform with MVC support in your ASP.NET Core application.

Declaration
public static IServiceCollection AddCmsMvc(this IServiceCollection services)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services

The service collection.

Returns
Type Description
Microsoft.Extensions.DependencyInjection.IServiceCollection

An Microsoft.Extensions.DependencyInjection.IServiceCollection instance that can be used to configure the CMS further.