MvcServiceCollectionExtensions Class

Definition

Extension methods for setting up MVC services in an IServiceCollection.

public ref class MvcServiceCollectionExtensions abstract sealed
public static class MvcServiceCollectionExtensions
type MvcServiceCollectionExtensions = class
Public Module MvcServiceCollectionExtensions
Inheritance
MvcServiceCollectionExtensions

Methods

AddControllers(IServiceCollection)

Adds services for controllers to the specified IServiceCollection. This method will not register services used for views or pages.

AddControllers(IServiceCollection, Action<MvcOptions>)

Adds services for controllers to the specified IServiceCollection. This method will not register services used for views or pages.

AddControllersWithViews(IServiceCollection)

Adds services for controllers to the specified IServiceCollection. This method will not register services used for pages.

AddControllersWithViews(IServiceCollection, Action<MvcOptions>)

Adds services for controllers to the specified IServiceCollection. This method will not register services used for pages.

AddMvc(IServiceCollection)

Adds MVC services to the specified IServiceCollection.

AddMvc(IServiceCollection, Action<MvcOptions>)

Adds MVC services to the specified IServiceCollection.

AddRazorPages(IServiceCollection)

Adds services for pages to the specified IServiceCollection.

AddRazorPages(IServiceCollection, Action<RazorPagesOptions>)

Adds services for pages to the specified IServiceCollection.

Applies to