Latest Posts On Code Maze

Chain of Responsibility Design Pattern in C#

Chain of Responsibility Design Pattern in C#

In this article, we will talk about the Chain of Responsibility Design Pattern. We are going to see how to implement this pattern in C# and how it can solve certain design problems. [sc name="github"...

Optimistic Locking vs Pessimistic Locking in .NET

Optimistic Locking vs Pessimistic Locking in .NET

Since the invention of database systems, they have become the primary source of truth for almost every web application's data. As user demands grow, applications scale, and so does the concurrency within the system. Ensuring data integrity and consistency along with...

Early Binding and Late Binding in C#

Early Binding and Late Binding in C#

In C#, method binding refers to associating a method call with the method's code definition. When we invoke a method, the program determines which specific method to execute. This process, known as "binding," can occur at two different times: during compile-time...

How to Use Pointers in C#

How to Use Pointers in C#

In this article, we'll introduce pointers in C#, exploring their syntax, usage in unsafe code blocks, and practical applications with direct memory manipulation. We'll also discuss considerations involved in using pointers in a managed language. [sc name="github"...

Content Negotiation in an ASP.NET Core Minimal API Using Carter

Content Negotiation in an ASP.NET Core Minimal API Using Carter

In this article, we'll examine how to implement content negotiation in an ASP.NET Core Minimal API. Since there are several ways to implement content negotiation in .NET APIs, we'll briefly discuss the different approaches and tradeoffs for each. [sc name="github"...

How to Get an Instance of IServiceProvider in .NET

How to Get an Instance of IServiceProvider in .NET

In modern .NET applications, dependency injection is a fundamental design pattern that promotes loose coupling and enhances maintainability. At the center of .NET's dependency injection system lies the IServiceProvider interface, which acts as a service locator for...

Entity Framework Core Best Practices

Entity Framework Core Best Practices

Entity Framework Core (EF Core) is an object-relational mapper (ORM), enabling us to work with a database using .NET objects, eliminating much of the data-access code we usually need to write. EF Core supports many databases, including SQL Server, SQLite, PostgreSQL,...

Publish MediatR Notifications in Parallel

Publish MediatR Notifications in Parallel

In this article, we will explore how publishing MediatR notifications in parallel works. Also, we will dive into the advantages and possible pitfalls of using parallel publishing. [sc name="github"...

How to Use the REPR (Request-Endpoint-Response) Pattern in .NET

How to Use the REPR (Request-Endpoint-Response) Pattern in .NET

In this article, we are going to explore the REPR (Request-Endpoint-Response) design pattern in .NET. We'll start our discussion by examining what the REPR pattern entails. Then, we'll go on to see how we can use it in our .NET projects. Finally, we'll look at the...

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