Mvc​Application​Builder​Extensions Mvc​Application​Builder​Extensions Class

Definition

Extension methods for IApplicationBuilder to add MVC to the request execution pipeline.
public static class MvcApplicationBuilderExtensionsPublic Module MvcApplicationBuilderExtensions
Inheritance
System.ObjectSystem.Object
MvcApplicationBuilderExtensionsMvcApplicationBuilderExtensions

Inherited Members

System.Object

System.Object.ToString()System.Object.ToString()
System.Object.Equals(System.Object)System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()System.Object.GetHashCode()
System.Object.GetType()System.Object.GetType()
System.Object.MemberwiseClone()System.Object.MemberwiseClone()

Methods

UseMvc(IApplicationBuilder) UseMvc(IApplicationBuilder)

Adds MVC to the IApplicationBuilder request execution pipeline.
public static IApplicationBuilder UseMvc(this IApplicationBuilder app)<ExtensionAttribute>
Public Shared Function UseMvc(app As IApplicationBuilder) As IApplicationBuilder
Parameters
Returns
A reference to this instance after the operation has completed.

Remarks

This method only supports attribute routing. To add conventional routes use UseMvc(IApplicationBuilder, Action<IRouteBuilder>).

UseMvc(IApplicationBuilder, Action<IRouteBuilder>) UseMvc(IApplicationBuilder, Action(Of IRouteBuilder))

Adds MVC to the IApplicationBuilder request execution pipeline.
public static IApplicationBuilder UseMvc(this IApplicationBuilder app, Action<IRouteBuilder> configureRoutes)<ExtensionAttribute>
Public Shared Function UseMvc(app As IApplicationBuilder, configureRoutes As Action(Of IRouteBuilder)) As IApplicationBuilder
Parameters
configureRoutes
System.Action<IRouteBuilder> System.Action(Of IRouteBuilder)
A callback to configure MVC routes.
Returns
A reference to this instance after the operation has completed.

UseMvcWithDefaultRoute(IApplicationBuilder) UseMvcWithDefaultRoute(IApplicationBuilder)

Adds MVC to the IApplicationBuilder request execution pipeline with a default route named 'default' and the following template: '{controller=Home}/{action=Index}/{id?}'.
public static IApplicationBuilder UseMvcWithDefaultRoute(this IApplicationBuilder app)<ExtensionAttribute>
Public Shared Function UseMvcWithDefaultRoute(app As IApplicationBuilder) As IApplicationBuilder
Parameters
Returns
A reference to this instance after the operation has completed.