
Discover dotnet core clean architecture basics, from application core to presentation and infrastructure, using solid principles, cqrs, and a scalable project structure for multi-team development.
Set up Visual Studio with the GitHub extension, sign into GitHub, and create a public project named clean architecture demo with gitignore and readme via Team Explorer.
Create and commit an initial clean architecture solution in Visual Studio, name Blink Solution, push to origin master, and explore branches, pull requests, and GitHub workflow.
Organize a .NET core clean architecture solution by creating folders for application, domain, infrastructure (IoC and data), and UI, then wire services via dependency injection for modular, plug-and-play components.
scaffold a clean architecture presentation layer as an asp.net core mvc project with https, built-in identity user accounts, and a dedicated identity database, plus dependency injection and project structure.
Update the app's identity database connection to university identity db, configure the startup to use it, and add an initial migration for the application db context, then apply it.
Launch an MVC app by applying migrations to initialize the application DB context and identity tables, then register and log in to see password hashing and two-factor options.
Rename folders to reflect clean architecture layers—presentation, infrastructure, data, IOC, domain, and application—and align project namespaces with proper naming conventions, supporting cross-cutting concerns and various presentation projects.
Upgrade the .NET Core SDK to version 2.2.106 compatible with Visual Studio 2017 by downloading from dotnet.microsoft.com and running the installer, then verify the version and restart Visual Studio.
Create a domain project folder for models and define a course domain model with id, name, and description. Prepare for entity framework mapping to a SQL Server context.
Create a university db context in the infrastructure data layer and expose a courses db set, then configure MVC startup with a SQL Server connection string and EF Core migrations.
Install and configure Microsoft Entity Framework Core packages, create a university DbContext with a Courses DbSet, and reference the domain project for later migrations and mvc startup integration.
Configure mvc startup to add university db context with sql server and two connection strings in appsettings, use dependency injection to manage contexts, and run migrations to create university database.
Commit infrastructure data layer adds the university db context, updates app settings with the UniversityDB connection string, and prepares the MVC project with migrations, domain model, and upcoming services and view models.
Create a clean arc dot application class library for the application core using .NET Core, add folders for interfaces, services, and viewmodels, then rebuild and commit to master.
Create view models that mask domain entities and present a courses collection in MVC views, illustrating clean architecture separation and injectable services for fetching data from SQL Server.
Define a public course service interface in the application layer with a get courses method returning an enumerable of course view models, abstracting the domain entity for mvc.
Define an AI course repository interface in the domain project to return a list of domain course entities, enabling mapping to course view models in the service.
Implement a concrete core service that implements the I course service and inject the I course repository via constructor, then create a course repository in the data layer.
Implement the infrastructure data layer by creating an ai course repository, wiring it to domain interfaces, and applying constructor injection with the university db context for dependency injection.
Implement get courses in the repository using the db context and return a course view model from the service. Align the interface and dependency injection with the IoC layer.
Set up a clean architecture infrastructure IOC using Microsoft extensions dependency injection. Create a class library, add NuGet package, wire interfaces to concrete implementations, then commit and build.
Set up a dependency container across the application, data, and domain layers by connecting ICourseService to CourseService and ICourseRepository to CourseRepository using the Microsoft extensions dependency injection extension library.
Hook up the dependency container with the presentation layer to inject the course controller and service, register all services in startup, and prepare the repository connection via IOC.
Seed initial course data by adding a new controller linked to the core service and repository, then insert three courses into SQL Server with image paths for MVC.
Add an images folder in the static files project, copy the downloaded images into it, and verify three images are present for use in the app.
implement a course controller in a .net core clean architecture project and inject the ICourseService via the constructor, enabling dependency injection through a private field.
Create and assign a course view model from the core service using dependency injection in a layered architecture so the presentation layer receives the view model via get courses.
Define the course view by creating a dedicated folder and index razor view, reference the course view model, and render each course’s image and name with a razor loop.
Define custom css for course content and image styling by editing the site css, setting padding, container and image sizes, background, borders, and a shadow to frame the course image.
Get Started with .NET Core Clean Architecture!
Are you a student or professional in the field of software engineering or maybe contemplating an educational or career move to the software engineering world? Have you been looking for a quick and easy way to get up and running with .NET Core coupled with Clean Architecture and don't want to go through an overwhelming amount of material just to get your environment setup and ready for building your own apps that interact with data? Don't worry as THIS IS THE COURSE FOR YOU!
In my course, I will teach you how to get your environment setup for .NET Core MVC, SQL Server 2017, Dependency Injection, MediatR, AutoMapper and help you to build your first set of apps that apply a Clean Architecture design pattern through a step-by-step guided approach.
Take this course and feel proud of the fact that you will be one step closer towards the rewarding field of Software Engineering using .NET technologies!