March 2016
Intermediate to advanced
550 pages
10h 57m
English
In the Solution Explorer window, double-click on the Startup.cs file.
Notice the ConfigureServices method that adds support for MVC. Later, we will add statements here to add support for the Entity Framework Core:
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddMvc();
}Next, we have the Configure method.
The most important statement here is the one that calls UseMvc and maps a default route. This route is very flexible, because it would match almost any incoming URL:
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); if (env.IsDevelopment()) ...Read now
Unlock full access