There are a few Mediator and Command implementations in the .NET ecosystem. The most popular one has been Mediatr. But with the recent announcement that Mediatr is moving to a commercial license, many developers looking for alternatives. In an attempt to support the .NET community, I am building a simplified Mediator and Command library that … Continue reading Getting Started with D20Tek.Mediator Package
Blog Feed
Using the with Expression on Classes
Just today I learned that the with expression in C# is not limited to records. It can also be used with classes, as long as the class is defined with the with expression requirements. And what are the requirements to work with the with expression? Requirements for with expressions to work: The type must be … Continue reading Using the with Expression on Classes
Setting up WebApi Sample Project
In many of our future articles, we will be using ASP.NET MinimalApi project to show how the Mediator library can be used. So in this article, we will discuss how to create WebApi projects in Visual Studio. Create the WebApi Project If you don't already have a WebApi project, please create a new one called … Continue reading Setting up WebApi Sample Project
Understanding the Mediator and Command Patterns: Theory, Use Cases, and Trade-offs
In the world of software design, decoupling is a recurring goal. Systems built from loosely coupled components are more maintainable, testable, and scalable. But we still want to balance that with being easy to use in simple scenarios. Two design patterns that often work well together to achieve this are the Mediator and Command patterns. … Continue reading Understanding the Mediator and Command Patterns: Theory, Use Cases, and Trade-offs
Announcing the Habit Tracker Beta Release
I have been working on an end-to-end sample application for .NET... from Blazor on the frontend to MinimalApi on the backend. And, I'm ready to have some beta testers using the project - Habit Tracker app (Getting Started page). This is a full application that allows users to define categories and habits that they wish … Continue reading Announcing the Habit Tracker Beta Release
How-To: Use Bootstrap 5.3 Built-in Icons in Blazor
Starting with version 5, Bootstrap introduced a rich set of SVG-based icons—lightweight, scalable, and perfect for modern web applications. Since the default Blazor WebApp templates already include Bootstrap, integrating these icons is a simple way to enhance your UI with clear, consistent visual elements. Using icons effectively can make your Blazor apps more intuitive and … Continue reading How-To: Use Bootstrap 5.3 Built-in Icons in Blazor
Using Scalar with .NET9 WebApi Projects
With the latest release of .NET, you will notice that new WebApi projects no longer integrate with Swagger to provide a documentation web page. In .NET 9, Microsoft made a strategic decision to remove the default inclusion of Swashbuckle.AspNetCore (commonly known as Swagger) from Web API project templates. This shift is primarily due to the … Continue reading Using Scalar with .NET9 WebApi Projects
CSS Accent-color Element
This CSS rule applies the accent color uniformly across the entire webpage for interactive elements like links and buttons. This means you don’t have to style each element individually every time you want to use this color, ensuring consistency throughout your site. body { accent-color: green; }
How-To: Create Blazor Dark-Mode App with Bootstrap 5.3
Many web applications today support dark-mode display because users (and especially developers) enough the benefit of reading content with a dark background. Blazor apps that are built with Bootstrap 5.3 can easily support dark mode in their applications. In this article, we will only focus on defaulting the application to dark-model... a future article will … Continue reading How-To: Create Blazor Dark-Mode App with Bootstrap 5.3
Central Package Management with NuGet
Managing dependencies across multiple projects can get unwieldy, especially as the project count grows. NuGet's Central Package Management (CPM) feature aims to simplify this by letting developers define package versions in a single location. With CPM, you avoid the redundancy of specifying package versions in each project individually. Here, we’ll explore how to set up … Continue reading Central Package Management with NuGet