Latest Posts On Code Maze

Mediator Design Pattern in C#

Mediator Design Pattern in C#

 In this article, we are going to talk about a popular design pattern, the Mediator Pattern. We will see how this pattern helps address some design problems and how to implement it in C#. [sc name="github"...

SIMD Accelerated Numeric Types in C#

SIMD Accelerated Numeric Types in C#

In this article, let's explore the various SIMD (Single Instruction, Multiple Data) accelerated numeric types in .NET. We'll start by examining what SIMD stands for and how it works in .NET. Then, we'll look at the different SIMD accelerated numeric types available in...

StringValues in ASP.NET Core

StringValues in ASP.NET Core

When developing web applications using ASP.NET Core, we frequently encounter scenarios where we need to manage collections of strings. These collections can originate from various sources, such as HTTP headers, query strings, form data, and configuration settings....

How to Implement Log4net in C#/.NET

How to Implement Log4net in C#/.NET

In this article, we will learn how to implement Log4net, a logging framework for C# applications, and how to use it effectively. Knowing how to log properly helps us to be more efficient while debugging, monitoring, and maintaining our applications. [sc name="github"...

Advanced Debugging in C#

Advanced Debugging in C#

In this article, we'll be talking about advanced debugging and inspecting data in C#. We'll be using Visual Studio 2022 to demonstrate all the debugging techniques. For more information about general debugging, we have another article on the basics of debugging, so...

Introduction to the Wolverine Library in .NET

Introduction to the Wolverine Library in .NET

In this article, we'll introduce the Wolverine library and its benefits for .NET developers. We'll cover installation, setting up our first project, and core concepts around messaging. By the end, we'll understand how to use Wolverine effectively in common practices...

Run a Large Language Model(LLM) Like ChatGPT Locally With C#

Run a Large Language Model(LLM) Like ChatGPT Locally With C#

We are quickly entering the era of AI in Tech and software development. AIs are no longer relegated to research labs. More recently, we have gained access to using AI on the web and even on our personal devices. Now, we can run AIs locally on our personal computers....

Implementing the Saga Pattern Using Rebus and RabbitMQ

Implementing the Saga Pattern Using Rebus and RabbitMQ

In this article, we provide a technical guide on implementing the Saga Pattern using Rebus and RabbitMQ in a .NET environment. Rebus is a .NET library designed to create distributed applications with messaging capabilities, simplifying the process of sending and...

Template Method Design Pattern in C#

Template Method Design Pattern in C#

In this article, we will talk about a behavioral design pattern, the Template Method Pattern. We are going to see how this pattern helps deal with certain design problems and how to implement it in C#. [sc name="github"...

The LINQ Where Method in C#

The LINQ Where Method in C#

In this article, we'll focus on the use cases of the LINQ Where Method in C#. The LINQ Where Method offers a powerful tool that can manipulate data from...

How to Convert a Stream to a File in C#

How to Convert a Stream to a File in C#

In this article, we'll discuss how to convert a stream to a file in C#. We will demonstrate different ways to do that, discuss the advantages and disadvantages of each, and see when one way could be more suitable.   [sc name="github"...

How to Test IServiceCollection Registrations in .NET

How to Test IServiceCollection Registrations in .NET

Unit testing IServiceCollection registrations in .NET enables us to test our application's IServiceCollection to confirm that the setup of dependency injection is correct, allowing us to catch errors early in development. E.g. if we fail to register a service or...

Using EF Core Interceptors in .NET

Using EF Core Interceptors in .NET

Entity Framework Core (EF Core) has many powerful features, with Interceptors being one of the most versatile. Interceptors allow us to plug in custom behavior at different stages of the EF Core operation pipeline, giving us enhanced control over data interaction...