Welcome to this detailed walkthrough of the Match Event Type Module from the Soccer League App with MongoDB project! ⚽💻
In this tutorial, I will look into the C# application layer where we handle all the logic related to match event types — such as goals, fouls, cards, substitutions, and more. You’ll learn how the system is structured using CQRS, MediatR, FluentValidation, AutoMapper, and a clean architecture pattern.
Here’s what we’ll cover step by step:
✅ DTOs (Data Transfer Objects) — Learn how data moves between layers with MatchEventTypeDto, CreateMatchEventTypeDto, and UpdateMatchEventTypeDto.
✅ Repository Contracts — Understand how IMatchEventTypeRepository defines the persistence logic for CRUD and custom queries.
✅ Mappings — Explore how AutoMapper simplifies model-to-DTO conversions in MatchEventTypeProfile.
✅ Commands and Command Handlers — Create, update, and delete match event types with validation, mapping, and repository interaction.
✅ Queries and Query Handlers — Retrieve match event types using filters such as “active,” “score affecting,” and “discipline affecting.”
✅ Validation — Discover how FluentValidation ensures data integrity and uniqueness with async checks.
By the end of this video, you’ll have a clear understanding of how this part of the application fits into the larger Soccer League App architecture — and how you can apply these same concepts in your own C# and .NET projects.
🧠 Concepts Demonstrated:
Clean Architecture (Application Layer Focus)
CQRS + MediatR Pattern
FluentValidation for business rules
AutoMapper for clean object mapping
Repository pattern with async operations
📦 Source Code:
You can explore and clone the full project from the official GitHub repository:
👉 https://github.com/benjaminsqlserver/...
💬 If you enjoy this tutorial:
Drop a like 👍
Subscribe for more clean architecture and .NET backend development videos
Comment your thoughts or questions — I’ll be happy to discuss or clarify any part of the code!
#dotnet #csharp #cqrs #mediatr #mongodb #cleanarchitecture #soccerleagueapp #fluentvalidation #automapper #backenddevelopment