Update MVC sample to include a route
This commit is contained in:
parent
9d9e844a3d
commit
6626035c22
|
|
@ -1,5 +1,4 @@
|
||||||
using Microsoft.AspNet.Builder;
|
using Microsoft.AspNet.Builder;
|
||||||
using Microsoft.AspNet.Routing;
|
|
||||||
using Microsoft.Framework.DependencyInjection;
|
using Microsoft.Framework.DependencyInjection;
|
||||||
|
|
||||||
namespace HelloMvc
|
namespace HelloMvc
|
||||||
|
|
@ -15,7 +14,10 @@ namespace HelloMvc
|
||||||
{
|
{
|
||||||
app.UseErrorPage();
|
app.UseErrorPage();
|
||||||
|
|
||||||
app.UseMvc();
|
app.UseMvc(routes =>
|
||||||
|
{
|
||||||
|
routes.MapRoute("default", "{controller=Home}/{action=Index}/{id?}");
|
||||||
|
});
|
||||||
|
|
||||||
app.UseWelcomePage();
|
app.UseWelcomePage();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Kestrel": "1.0.0-*",
|
"Kestrel": "1.0.0-*",
|
||||||
"Microsoft.AspNet.Diagnostics": "1.0.0-*",
|
"Microsoft.AspNet.Diagnostics": "1.0.0-*",
|
||||||
"Microsoft.AspNet.Hosting": "1.0.0-*",
|
|
||||||
"Microsoft.AspNet.Mvc": "6.0.0-*",
|
"Microsoft.AspNet.Mvc": "6.0.0-*",
|
||||||
"Microsoft.AspNet.Server.IIS": "1.0.0-*",
|
"Microsoft.AspNet.Server.IIS": "1.0.0-*",
|
||||||
"Microsoft.AspNet.Server.WebListener": "1.0.0-*"
|
"Microsoft.AspNet.Server.WebListener": "1.0.0-*"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue