Latest Posts On Code Maze

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...

How to Cancel an HTTP Request on Leaving a Blazor Component

How to Cancel an HTTP Request on Leaving a Blazor Component

This article explores how to cancel an HTTP request and the associated backend operation inside a Blazor component. After a brief introduction to the architecture for canceling backend operations, we will familiarize ourselves with cancellation tokens and how to...

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...

Abstract Factory Design Pattern in C#

Abstract Factory Design Pattern in C#

The Abstract Factory design pattern is a creational pattern that handles object instantiations. It offers a framework to manage complex object creation scenarios and helps us achieve a more maintainable code structure. In this article, we'll look into the Abstract...

How to Read appsettings.json in a .NET Console Application

How to Read appsettings.json in a .NET Console Application

In this article, we will learn how to read appsettings.json in a .NET console application. Explanation Of appsettings.json The appsettings.json file in .NET applications serves as a centralized repository for configuration settings, utilizing the JSON format for its...

Bridge Design Pattern in C#

Bridge Design Pattern in C#

In this article, we are going to talk about a structural design pattern, the Bridge Pattern. We will discuss what problem this pattern solves and how to implement it in C#. [sc name="github"...

Multitenancy in .NET With Orchard Core

Multitenancy in .NET With Orchard Core

Orchard Core, a multipurpose open-source platform built upon ASP.NET Core, offers strong support for multi-tenancy. This article explores the installation and configuration of Orchard Core for multitenancy .NET applications, as well as the setup of multitenancy...

Proxy Design Pattern in C#

Proxy Design Pattern in C#

In this article, we are going to talk about a structural design pattern, the Proxy Pattern. We will discuss what problem this pattern solves and how to implement it in C#. [sc name="github"...