-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Modify BuilderExtensions.UseMvc to not add any routes by default #1880
Conversation
/// Adds Mvc to the <see cref="IApplicationBuilder"/> request execution pipeline. | ||
/// </summary> | ||
/// <param name="app">The <see cref="IApplicationBuilder"/> to add Mvc too.</param> | ||
/// <returns>The <paramref name="app"/>.</returns> | ||
public static IApplicationBuilder UseMvc([NotNull] this IApplicationBuilder app) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should docs include <remarks/>
describing expectation application uses attribute routes exclusively?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ehh, not super sure on this - remarks shouldn't be a place for specifying application design guidance. This sounds more like a sample \ doc thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like we could say something here without it being design guidance.
UseMvc() only supports attribute routing. To add conventional routes use AddMvc(...).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
after minor fixes |
/// <summary> | ||
/// Adds Mvc to the <see cref="IApplicationBuilder"/> request execution pipeline. | ||
/// </summary> | ||
/// <param name="app">The <see cref="IApplicationBuilder"/> to add Mvc too.</param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The to add Mvc too.
The <see cref="IApplicationBuilder"/>.
IMO
Updated |
@@ -4,7 +4,6 @@ | |||
using Microsoft.AspNet.Builder; | |||
using Microsoft.AspNet.Mvc; | |||
using Microsoft.AspNet.Mvc.Xml; | |||
using Microsoft.AspNet.Routing; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, so this'll go in after your Routing change?
Fixes #1879