setting-up-an-mvc-application-slides
setting-up-an-mvc-application-slides
Gill Cleeren
CTO XPIRIT BELGIUM
@gillcleeren www.snowball.be
Overview
Exploring the project structure
Configuring the site
Exploring the Project Structure
Creating a New Project
Available Project Templates
Project Structure (Empty)
Project Structure (Web Application MVC)
Demo
File à New Project
Exploring the new project
Site Configuration
Project Structure
Program.cs
}
public void ConfigureServices(IServiceCollection services)
{
//register services here through Dependency Injection
ConfigureServices Method
Tight Coupling
MyClass Logger
Adding Interfaces to the Mix
ILogger
MyClass Logger
Adding Interfaces to the Mix
DI
MyClass Logger
Container
ILogger
public void ConfigureServices(IServiceCollection services)
{
//register framework services
services.AddControllersWithViews();
//register our own services (more later)
ConfigureServices Method
Configure Method
Request
Response
Configure Method
Request
Response
Configure method
Startup class
Pipeline is created
Demo