Latest Posts On Code Maze

Code Maze Weekly #162

Code Maze Weekly #162

Issue #162 of the Code Maze weekly. Check out what's new this week and enjoy the read. .NET and C# Top Picks Using Hangfire with ASP.NET Core [damienbod.com] Hangfire is a very popular open-source library for performing background...

Different Types of Comments in C# and Should We Use Them

Different Types of Comments in C# and Should We Use Them

In this article, we are going to talk about different types of comments in C#. The compiler will compile any syntactically correct code into an intermediate language, and after that, the .NET runtime will execute this IL code on the client computer. The computer will...

Resolving the Call Is Ambiguous Error While Using LINQ

Resolving the Call Is Ambiguous Error While Using LINQ

In this article, we will learn when the "call is ambiguous" error happens, why the error happens, and how to work around the issue. There are still so many legacy projects using older versions of EF Core, and in those projects, this error can cause a lot of headaches...

Create Clean Guard Clauses With GuardClauses in C#

Create Clean Guard Clauses With GuardClauses in C#

In this article, we discuss how to create guard clauses, how they differ from user input validation, and how to improve our guards by writing clean guard clauses leveraging the GuardClauses library. Sometimes passwords can end up being exposed even if...

Determine Whether Two Date Ranges Overlap in C#

Determine Whether Two Date Ranges Overlap in C#

In this article, we will discuss how to determine whether two date ranges overlap in C#. We will explore how to achieve this result using the DateOnly and TimeOnly records and then, we're going to beautify our implementation with a custom class representing date...

Multipart Form-Data in HttpClient with ASP.NET Core

Multipart Form-Data in HttpClient with ASP.NET Core

In this article, we will learn what multipart requests are and how we can use them. Also, we will review examples of how to send data to remote servers using multipart form-data with HttpClient in ASP.NET Core.

To download the source code for this article, you can visit our GitHub repository.
A very beginner-friendly article to starting with EF Core...

.NET Dependency Injection With Constructor Parameters

.NET Dependency Injection With Constructor Parameters

Introduction In this article, we'll look at ways to use dependency injection with constructor parameters in .NET Core. Dependency injection (DI) with constructor parameters is a way for us to pass the things our class needs (depends on) when we create a new instance...

Asynchronous Programming Patterns in .NET

Asynchronous Programming Patterns in .NET

In this article, we are going to learn about the various patterns to implement asynchronous programming in .NET. .NET has had in-built support for asynchronous programming since the release of .NET Framework 1.1. It has been through various improvements over the...

How to Clone a List in C#?

How to Clone a List in C#?

In this article, we will look at all the different ways we can clone a List in C# to another and what we should pay attention to when doing so. In...

Refactoring Bloated Code in C#

Refactoring Bloated Code in C#

In this article, we will learn what anti-patterns belong to the group of code smells called bloaters and different techniques for refactoring bloated code in C#. [sc name="github"...