Code Maze Author

Code Maze

This is the standard author on the site. Most articles are published by individual authors, with their profiles, but when several authors have contributed, we publish collectively as a part of this profile.
Also find me here:



MY ARTICLES:

Hexagonal Architectural Pattern in C#

In this article, we are going to describe the hexagonal architectural pattern. We will explain its structure, where it came from, and its advantages and disadvantages. Furthermore, we will demonstrate its implementation in C#. [sc name="github"...

Local Functions in C#

In this article, we will learn about the local functions in C#. We'll explore the significance of local functions and how we can create them. Furthermore, we will discuss the best practices and compare them with lambda expressions. [sc name="github"...

How To Read the Request Body in ASP.NET Core Web API

ASP.NET Core offers a versatile request-response pipeline, allowing seamless customization and intervention. Managing incoming requests to read the request body in an ASP.NET Core Web API application is a common and crucial task. There are multiple methods and...

How to Determine the Operating System in .NET Core

In this article, we are going to find out how to determine the operating system of a computer on which our .NET Core application is running. [sc name="github" url="https://github.com/CodeMazeBlog/CodeMazeGuides/tree/main/dotnet-base-libraries/DetermineOperatingSystem"...

How to Check if a File Is in Use With C#

File manipulation is a common and broad thing in the .NET world and in some cases can lead to certain exceptions. In this article, we will focus on files already in use, and see how we can avoid it.  [sc name="github"...

REST vs WebSockets in C#

Generally, REST and WebSockets are both means of ensuring communication between two or more applications. In this article, we are going to look into them in detail to understand their individual strengths, and weaknesses and when to choose one over the other. [sc...

The Differences Between Quartz.NET and Hangfire

There are many scenarios for background tasks, ranging from a task that runs for a long time to perhaps an operation that needs to be retried multiple times if it fails, and many other scenarios in between. In this article, we will discuss the differences between...

ConcurrentStack in C#

In this article, we will take a closer look at the .NET collection ConcurrentStack. As software development evolves, multi-threading has become essential for efficient, scalable applications. However, managing concurrent operations, especially due to thread-safety...

Using Static Anonymous Functions in C#

In this article, we'll review static anonymous functions, which were introduced in C# 9. To understand how they can improve our code, we should first have a look at non-static anonymous methods and lambda expressions. Let's see what happens, as far as memory...

How to Get a Database Row as JSON Using Dapper

In this article, we will explore how to retrieve a database row as JSON using Dapper in the context of an ASP.NET Core Web API project. Our focus will be on data retrieval and serialization. We'll exclude discussions of the intricacies of Dapper itself and the setup...

How to Use Interceptors in C# 12

In C# 12, interceptors are a new experimental compiler feature that enables rerouting specific method calls to different code. Typically, developers use interceptors with code generators to modify the behavior of existing code without altering the code itself. In this...

Pipes and Filters Architectural Pattern in C#

As the popular saying suggests, "Divide and Rule", the same principle can be applied in software development. There is an architectural pattern known as "Pipes and Filters", which is used to accomplish just that. The idea is to break down a complex task into smaller...

Read and Write Windows Registry in C#

In this article, we will learn what Windows Registry is, how we can work with it in .NET Core, and how we can read and write Windows Registry in C#. After that, we will explore some advanced use cases of the Windows Registry.  [sc name="github"...

Event-Driven Architecture in C#

Event-driven architecture is a powerful pattern for building scalable, responsive, and loosely coupled systems. In this article, we will look into event-driven architecture in C#. We'll explore what the pattern is, its use cases, and its advantages through examples....

Hot Reload in ASP.NET Core Applications

In this article, we will dive into what hot reload is and how it revolutionizes our development workflow. We will review its features, origins, examples, and most importantly best practices. Let's start. What is Hot Reload Hot reload stands as a transformative feature...