Latest Posts On Code Maze

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

What Does the null! Statement Do?

What Does the null! Statement Do?

In this article, we are going to discuss the null! statement in C#. First, we will explore its construct, and function in our programs. Then, we will examine various situations where we can use this statement in our applications. [sc name="github"...

How to Use FakeLogger to Test Logging Code in .NET

How to Use FakeLogger to Test Logging Code in .NET

In software development, logging, and unit testing serve as foundational tools, each actively contributing to the reliability and functionality of our applications. While unit testing promptly alerts us to changes in our application's business logic, logging actively...

How to Ignore a Property in AutoMapper

How to Ignore a Property in AutoMapper

In this article, we will explore key techniques to ignore property in AutoMapper. We will use the Ignore() method, the Ignore attribute, and the DoNotValidate() method. We will also discuss when and how to use each of the methods mentioned. [sc name="github"...

Flattening Nested Collections in C#

Flattening Nested Collections in C#

In this article, we'll explore flattening nested collections in C#. We'll examine different approaches for handling from simple to complex data structures, offering practical guidance to effectively flatten nested collections within our C# applications. [sc...

Differences Between Span and Memory in C#

Differences Between Span and Memory in C#

In this article, we'll briefly explain the Span and Memory .NET types and mention their primary usage. Furthermore, we will explore the differences between Span and Memory in C# in depth and conclude with some general tips on when to use one type over another. [sc...

Weak Events in C#

Weak Events in C#

We use weak events in C# to avoid memory leaks in event-based applications. Let's learn more about weak events, why they're needed, and how to implement them. [sc name="github"...