Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Consider adding a UseMvcWithDefaultRoute extension on BuilderExtensions that adds default routes to the route collection #1885

Closed
pranavkm opened this issue Jan 25, 2015 · 6 comments

Comments

@pranavkm
Copy link
Contributor

Based on the discussion here - https://github.com/aspnet/Mvc/pull/1880/files#r23486914.

This would be a convenience method that is essentially what UseMvc did prior to it being removed as part of #1880

@pranavkm
Copy link
Contributor Author

cc @Eilon @dougbu @yishaigalatzer

@Eilon
Copy link
Member

Eilon commented Jan 26, 2015

I'd like to state that it is critical that trivial apps not require a bunch of setup code.

Attribute routing solves this to a good degree. For conventional routing users it's now a bit of a hassle.

If we think attribute routing is the recommended approach for the "getting started" scenario, then I'd concede that the importance of this feature is lower. (And, it can be added at any time.)

@yishaigalatzer
Copy link
Contributor

The work involved in building this feature is negligible. Just need a good name.

-----Original Message-----
From: "Eilon Lipton" notifications@github.com
Sent: ‎1/‎25/‎2015 8:20 PM
To: "aspnet/Mvc" Mvc@noreply.github.com
Cc: "Yishai Galatzer" yishai_galatzer@yahoo.com
Subject: Re: [Mvc] Consider adding a UseMvcWithDefaultRoute extension onBuilderExtensions that adds default routes to the route collection (#1885)

I'd like to state that it is critical that trivial apps not require a bunch of setup code.
Attribute routing solves this to a good degree. For conventional routing users it's now a bit of a hassle.
If we think attribute routing is the recommended approach for the "getting started" scenario, then I'd concede that the importance of this feature is lower. (And, it can be added at any time.)

Reply to this email directly or view it on GitHub.=

@Eilon
Copy link
Member

Eilon commented Jan 26, 2015

Some ideas:

  1. .UseMvcWithDefaultRoute()
  2. .UseMvcConvention() / .UseMvcConventions()
  3. .UseMvcWithConvention() / .UseMvcWithConventions()
  4. .UseMvcAuto()
  5. .UseMvcDefault() / .UseMvcDefaults()

@pranavkm
Copy link
Contributor Author

We use the term Conventions for other things in Mvc - https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApplicationModelConventions.cs. Might result in confusing term overload.

@Eilon
Copy link
Member

Eilon commented Apr 24, 2015

@ajaybhargavb let's go with the name UseMvcWithDefaultRoute for now.

ajaybhargavb pushed a commit that referenced this issue Apr 27, 2015
Added `UseMvcWithDefaultRoute` extension method to `BuilderExtensions`,
which adds Mvc to the request pipeline with a default route to the
`Index` action on the `HomeController`.

#1885
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants