Understanding the ASP.NET Core MVC structure
ASP.NET Core is based on the concept of the Generic Host, as explained in the Using generic hosts subsection of Chapter 5, Applying a Microservice Architecture to Your Enterprise Application. The basic architecture of ASP.NET Core was outlined in the A short introduction to ASP.NET Core subsection of Chapter 14, Applying Service-Oriented Architectures with .NET Core.
It is worth reminding you that the host configuration is delegated to the Startup
class defined in the Startup.cs
file by calling the .UseStartup<Startup>()
method of the IWebHostBuilder
interface. ConfigureServices(IServiceCollection services)
of the Startup
class defines all services that can be injected into object constructors through Dependency Injection (DI). DI was described in detail in the Using generic hosts subsection of Chapter 5, Applying a Microservice Architecture to Your Enterprise Application.
On the other hand, the Configure(IApplicationBuilder...