A Create a blank Mvc
used automatically created Controllers, Models, Views
three MVC registration service
public void ConfigureServices(IServiceCollection ServiceCollection)
{
ServiceCollection.AddMvc();
}
Four registered MVC middleware, and configure the routing rules
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseMvc((RouteBuilder) => { RouteBuilder.MapRoute("default", "{Controller}/{Action}/{Parameter}", new { @Controller = "Home", @Action = "Index", @Parameter = String.Empty }); });
}
Create a controller with five Home Index view
six projects run ok