Skip to content

Commit 6626035

Browse files
committed
Update MVC sample to include a route
1 parent 9d9e844 commit 6626035

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

samples/HelloMvc/Startup.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Microsoft.AspNet.Builder;
2-
using Microsoft.AspNet.Routing;
32
using Microsoft.Framework.DependencyInjection;
43

54
namespace HelloMvc
@@ -15,7 +14,10 @@ public void Configure(IApplicationBuilder app)
1514
{
1615
app.UseErrorPage();
1716

18-
app.UseMvc();
17+
app.UseMvc(routes =>
18+
{
19+
routes.MapRoute("default", "{controller=Home}/{action=Index}/{id?}");
20+
});
1921

2022
app.UseWelcomePage();
2123
}

samples/HelloMvc/project.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"dependencies": {
1313
"Kestrel": "1.0.0-*",
1414
"Microsoft.AspNet.Diagnostics": "1.0.0-*",
15-
"Microsoft.AspNet.Hosting": "1.0.0-*",
1615
"Microsoft.AspNet.Mvc": "6.0.0-*",
1716
"Microsoft.AspNet.Server.IIS": "1.0.0-*",
1817
"Microsoft.AspNet.Server.WebListener": "1.0.0-*"

0 commit comments

Comments
 (0)