
Explore separation of concerns and the single responsibility principle to create modular, maintainable code. Split functionality into dedicated classes to avoid bloated, hard-to-maintain classes.
Apply the dry principle to avoid repetition, establishing a single implementation point that supports maintainability, aligns with the single responsibility and open/closed principles, and underpins dependency inversion in SOLID.
Discover how dependency inversion promotes loose coupling by abstracting dependencies with interfaces and injecting them into classes, with asp.net core’s built-in ioc container enabling maintainable, reusable code.
Explore common software architectures and learn how clean architecture improves testability and loose coupling. See how the application core, infrastructure, and user interface interact in API-driven ASP.NET Core projects.
Tour the ASP.NET Core app, tracing its move from a 3.1 all-in-one design to layered and emerging clean architecture, with refactoring from fat controllers and code smells toward maintainability.
Explore development environment in Visual Studio 2022 for building a restful api with dot net seven and dot net six compatibility, applying clean architecture, SOLID principles, and Entity Framework Core.
We set up a blank solution, rename it to air dot leave management dot clean, and organize folders for api, core, infrastructure, ui, and tests to enforce separation of concerns.
Map the solution folders to the clean architecture diagram, placing domain entities and application interfaces in the core, while outlining infrastructure, API, tests, and UI folders.
Set up the application course at the center, with the core containing domain entities and application interfaces to implement. Start with the domain project, then move along.
Create the domain project inside the core folder as a class library for the leaf management domain, defining leaf type, leaf allocation, and leave request.
Implement a cqrs get leave types query and handler with mediator, map leave type domain objects to dto, query the repository, and return a dto list to the api.
Develop the update leaf type command and its handler returning unit, and implement the delete leaf type command with a handler using repository get by ID and remove.
Explore how to add custom exceptions to control application flow, define not found exception and bad request exception, and tailor messages with a name and key for clear error handling.
Learn to implement fluent validation in ASP.NET Core, creating validators with rules for required fields, max length, and async checks, including database uniqueness via a repository.
We set up the application core by defining domain and application projects, hosting domain entities, persistence contracts, and data types for business logic, using mediator, auto mapper, and fluid validation.
Create db context with Entity Framework Core; map leaf types, leave allocations, leave requests. Override save changes for audit fields; apply configurations from assembly; register SQL Server via configuration.
Implement generic and specific repositories in the persistence layer. Inject the db context, create CRUD methods, and register scoped services for leave type, leave allocation, and leave requests.
Create the leave management infrastructure project to host contract implementations, set up a public static infrastructure services class with a service collection method, and prepare to integrate the email service.
Implement a cloud-based email service with SendGrid, defining the email sender contract and models for email message. Configure IOptions and register the email service with the API key.
Review section milestones by setting up the persistence project, implementing repositories, creating the infrastructure project for third-party services, configuring email and logging with strongly typed options, and reviewing source control.
Configure the api project by wiring extension-based services from application, infrastructure, and persistence, wiring app settings for email and connection strings, and enabling a course policy for external requests.
Scaffold a database by installing core tools, setting the correct startup project, adding an initial migration for leave types, leave allocations, and leave requests, then update the database.
Implement a thin api controller for leave types using MediatR, sending a get leave types query to its handler and returning a leave type dto, with Swagger OpenAPI support.
Implement and test a MediatR-based controller for leave types, covering get by id, create, update, and delete, with validation, AutoMapper mappings, Swagger documentation, and robust error handling.
Implement the complete leave request feature with queries and commands, including list and detail views, create update delete, cancel, and change approval workflows, plus shared validation and base leave request.
Implement a global exception middleware for an ASP.NET Core app to map exceptions to appropriate HTTP status codes and return custom validation problem details.
Explore how solid principles improve testability by authoring unit and integration tests with xUnit and mock frameworks, enabling fluent assertions and regression testing to preserve existing functionality.
Set up a mock leaf type repository to unit test the leaf types handler, using dependency injection and mocked GetAsync to validate known outcomes.
Evaluate integration testing with Entity Framework Core using an in-memory database to ensure create and update operations set date created and date modified, validating third-party data access through xUnit tests.
Validate that code operates as expected with automated tests, using mocks for dependencies in clean, modular designs. Distinguish unit and integration tests and write more tests.
Add UI for an ASP.NET core app using Blazar, generate code for API integration with Swagger Studio, configure JWT security with admin and employee roles, and build leave management interface.
Create a Blazor WebAssembly UI project within an ASP.NET Core solution, exploring project setup, templates, and core structure, including wwwroot, pages, components, and HTTP client integration with an API.
Add a typed http client for the api, set the base address from the api uri, and create contracts and implementations for leaf type, leave allocation, and leave request services.
Set up identity services in ASP.NET Core, configure identity core, and secure API and frontend interactions with administrative and employee roles using JWT authentication.
Review the segment on blazer web assembly for a single page app, code generation with Nswc Studio, custom components, and identity with JWT security for API communication.
Create leave request and leave type view models and a create page in a blazer app. Load leaf types from API, validate inputs, submit via the service, and navigate back.
Create an admin leave request view in asp.net core, exposing leave requests with employee details and IDs, and enable status updates via API, UI, and mapping logic.
Set up the details page for leave requests, implement approve and reject flows with update approval, handle UI state changes, and navigate back to the list after admin approval.
Review a working asp.net core leave application built on clean architecture, featuring admin approvals, employee cancellations, and token-based security across UI and API.
Overview
Many developers can build an ASP.NET Core CRUD application. Fewer know how to structure that application so it remains testable, maintainable, and easy to extend as requirements change. This course shows you how to take a real application and reshape it using SOLID principles and unit testing.
Learn how to refactor and structure an ASP.NET Core application using SOLID principles, Clean Architecture, CQRS, MediatR, EF Core, JWT authentication, validation, testing, and modern .NET practices. This course helps you move beyond basic CRUD development and design applications that are easier to test, maintain, and extend.
This course does not start with a tiny toy example. You work with an existing ASP.NET Core application and learn how to improve its structure the way developers often do in real projects: by identifying architectural problems, separating responsibilities, introducing application layers, adding validation, handling errors properly, securing APIs, and testing business logic.
Why SOLID Architecture?
When we talk about SOLID architecture, what we refer to isn’t straightforward. Decisions made early in the process can have a significant impact later on, and maintainability and testability play important roles. Adopting these practices can also help avoid code smells, refactor code, and facilitate more efficient agile development.
SOLID stands for:
S - Single-Responsibility Principle
O - Open-closed Principle
L - Liskov Substitution Principle
I - Interface Segregation Principle
D - Dependency Inversion Principle
In this course, you explore foundational architectural principles that help create maintainable code. You will discover how to set up a real-world application architecture with ASP.NET Core. Then, you’ll learn how to plug in common blocks such as email and authentication, and build a foundation for adding other third-party services as needed.
When you finish this course, you’ll have the skills and knowledge to create a testable and maintainable ASP.NET Core application to architect real-world enterprise .NET Core apps.
N.B. - The project in this course is based on the deliverables in Complete ASP.NET Core and Entity Framework Development. While it is not mandatory to take this course, much of the existing code will be reused from its content.
Build A Strong Foundation in .NET Clean Architecture:
Learn Clean or Onion Architecture and Best Practices
Learn Command Query Responsibility Segregation (CQRS)
Implement Mediatr Pattern
Add Email Service using SendGrid
Efficient Exception Handling and Routing
Implementing Unit Testing
Moq and Shouldy
Global Error Handling with Custom Middleware and Exceptions
Adding Validation Using Fluent Validation
Build a .NET Core API and Blazor UI Application
Implement JWT(JSON Web Token) Authentication
Content and Overview
To take this course, you must have some knowledge of .NET Core development and C#.
This is a huge course. Over 10 hours of premium content, but smartly broken up to highlight related activities based on each module in the application being built. We will also look at troubleshooting and debugging errors as we go along, implementing best practices, writing efficient logic, and understanding why developers do things the way they do. Your knowledge will grow, step by step, throughout the course, and you will be challenged to be the best you can be.
We don't do things perfectly the first time; that is different from the reality of writing code. We make mistakes, point them out, and fix them. By doing this, we develop proficiency in using debugging tools and techniques. By the time you have finished the course, you will have moved around in Visual Studio and examined logic and syntax errors so much that it will be second nature for you when working in the .NET environment. This will put your newly learned skills into practical use and impress your boss and coworkers.
The course includes working files hosted on GitHub, including resources to make it easier for you to replicate the code demonstrated. You will be able to work alongside the author as you work through each lecture and will receive a verifiable certificate of completion upon finishing the course.
Clicking the Take This Course button could be the best step you could take towards quickly increasing your income and marketability! Also, remember that if you don't think the course is worth what you spent, you have a full 30 days to get a no-questions-asked refund!
Best for late-beginner to intermediate ASP.NET Core developers who already know the basics and want to write cleaner, more maintainable application code.
It's time to take action!
See you in the course!