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"...
Code Maze Author
MY ARTICLES:
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"...
 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"...
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"...
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"...
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"...
In this article, we will learn how to conditionally resolve dependencies in .NET. Conditional dependency resolution is a...
In this article, we will explain how to use a factory pattern with dependency injection in .NET. Let's dive in. [sc name="videolink" videotitle="Using...
In this article, we will learn how to serialize exceptions as JSON in .NET. Good exception handling is one of the key aspects of a successful enterprise application. And when we talk about an API, it's important that we provide relevant failure details to consumer...
In this post, we are going to learn how to create a custom JsonConverter in Json.NET. Json.NET (aka Newtonsoft.Json) is widely popular for its...
In this article, we are going to talk about the difference between returning and awaiting a Task in an async method in C#. The async/await...
In this post, we are going to learn how to read AppSettings values from a JSON file in ASP.NET Core. Let's start. [sc name="videolink"...
In this article, we are going to learn how to build a multitenant application with ASP.NET Core. What is Multitenancy To better understand...
In this article, we are going to learn how to call a generic method in C# using reflection. Generic methods are an all-time favorite of...
In this article, we are going to talk about Reflection in C#. Let's start. What is Reflection in C#? In the OOP world, we define the...
In this article, we are going to learn how to convert JSON to XML and XML to JSON in C#. We are going to explore how we can do such conversions...
Deserializing JSON into a dynamic object means skipping the class: we hand the JSON string to the serializer, ask for dynamic, and read properties by name at runtime. It is what we reach for when the payload's shape is unknown, changes often, or when we only want two...
In this post, we are going to learn how to write a JSON into a file in C#. JSON is structured, lightweight, widely supported, more readable, and more efficient...
A C# enum serializes as a number by default. To get its name instead, System.Text.Json takes a JsonStringEnumConverter and Newtonsoft.Json takes a StringEnumConverter, applied to one property, one enum type, one serializer call, or the whole application....
Use Task.Run. It is Task.Factory.StartNew with the two defaults almost every caller wants: TaskScheduler.Default instead of the current scheduler, and DenyChildAttach instead of allowing child tasks to attach, plus unwrapping for async delegates. Task.Factory.StartNew...
In this article, we are going to learn how to convert DateTime to ISO 8601 string in C#. There are various formats of ISO 8601 compliant date and time strings. We are going to build a console application and explore all these different formats. To...