using Microsoft.AspNet; using Microsoft.AspNet.Abstractions; using Microsoft.AspNet.Mvc; using Microsoft.AspNet.Routing; namespace MvcSample.Web { public class Startup { public void Configuration(IBuilder app) { app.UseServices(services => { services.AddMvc(); services.AddSingleton(); }); app.UseMvc(routes => { routes.MapRoute("{area}/{controller}/{action}"); routes.MapRoute( "{controller}/{action}", new { controller = "Home", action = "Index" }); routes.MapRoute( "{controller}", new { controller = "Home" }); }); } } }