Latest Posts On Code Maze

How to Send a JSON Object Using HttpClient in .NET

How to Send a JSON Object Using HttpClient in .NET

In modern web development, sending JSON objects over HTTP has become a common practice for exchanging data between clients and servers. In this article, we will explore how to send a JSON object using HttpClient. A nice breakdown of the heap data structure...

Difference Between Abstraction and Encapsulation in C#

Difference Between Abstraction and Encapsulation in C#

Let's explore the differences between abstraction and encapsulation in C#. Abstraction and encapsulation constitute fundamental concepts in object-oriented programming (OOP) and coexist in C#. Each of them fulfills key roles in the design and implementation of classes...

How to Create an Outer Join in LINQ – (Left and Right)

How to Create an Outer Join in LINQ – (Left and Right)

In this article, we'll discuss how to create an outer join in LINQ. Most used are left and right outer join, but we'll also talk about less common ones. It's hard to find an application that doesn't rely on data. We often use just a single data source. But sometimes...

Read a Text File Without Specifying the Full Path in C#

Read a Text File Without Specifying the Full Path in C#

In .NET applications, reading text files is essential for tasks like loading configurations, processing data, and parsing logs. In this article, we look at the file's relative and absolute paths and set up a new project to read a text file using its relative path. Tuples are a useful and practical .NET structure. In this article by David...

How to Fix CORS Error With AnyOrigin and AllowCredentials

How to Fix CORS Error With AnyOrigin and AllowCredentials

In this article, we will learn how to fix the CORS protocol error with AnyOrigin and AllowCredentials in ASP.NET Core (The CORS protocol does not allow specifying a wildcard (any) origin and credentials at the same time). We assume you know the basics of CORS and how...

Difference Between Build and Publish in Visual Studio

Difference Between Build and Publish in Visual Studio

Has anyone ever wondered about the difference between the build and publish functions in software development? As we know, both the build and publish are important steps in software development, especially when using Visual Studio for .NET applications.  Let’s check...

Single and Split Queries in Entity Framework Core

Single and Split Queries in Entity Framework Core

Entity Framework Core (EF Core) offers developers two powerful querying strategies: Single and Split Queries. In this article, we'll delve into the pros and cons of each, helping us make informed decisions for efficient data retrieval. The sample in our repository...

Clean Architecture in .NET

Clean Architecture in .NET

In this article, we are going to discuss Clean Architecture in .NET. So let's get going. [sc name="videolink" videotitle="Clean Architecture with...

How To Check if a URL Is Valid in C#

How To Check if a URL Is Valid in C#

In the world of web development using .NET, it's crucial to make sure the web addresses (URLs) our application uses are correct and safe. In this article, we will understand the basics of how to check if a URL is valid in C#. We'll include some easy-to-understand code...