Code Maze Author

Code Maze

This is the standard author on the site. Most articles are published by individual authors, with their profiles, but when several authors have contributed, we publish collectively as a part of this profile.
Also find me here:



MY ARTICLES:

URI Encode and Decode in .NET

In this article, we are going to learn about URI encode and decode and how we can achieve this using .NET. So, let's start. What is URI...

Init Only Setters in C#

In this article, we'll dive into one of the cool new features of C# 9.0: the Init keyword. First, we'll take a closer look at what this feature is. Then, we'll explore how the Init keyword works and how we can incorporate it into our projects. or MemoryStream can be problematic and discuss the benefits of using streams instead. By leveraging streams, we can significantly...

Using sizeof() Operator in C#

If we are looking for a way to get the size of a data type in C#, mastering the sizeof() operator is just what we need. This operator returns the accurate memory size that any data type occupies. In this article, we will dive into understanding how to use this...

Fast Inserts With Entity Framework (EF Core)

In this article, we will review multiple ways of performing fast inserts of bulk data into a database using the Entity Framework (EF for short). Entity Framework "classic" was introduced in 2008, was superseded nearly a decade later by EF Core, and continues to add...

How to Return XML From ASP.NET Core Web API

ASP.NET Core is a powerful and flexible platform for building web applications. It supports multiple data formats, including JSON and XML, and provides many tools for serialization and deserialization. In this article, we will focus on how to return XML from ASP.NET...

Short Circuit Evaluation of IF Statements with Await in C#

In this article, we are going to look at what exactly short circuit evaluation is in C# and how asynchronous calls are affecting it. [sc name="github" url="https://github.com/CodeMazeBlog/CodeMazeGuides/tree/main/async-csharp/ShortCircuitEvaluationWithAsyncAwait"...

Resource-Based Authorization in ASP.NET Core

When authorizing requests in ASP.NET Core Web API projects, it's not enough to know the endpoint and the user; we also need to be aware of the specific resource the user is trying to access. In this article, we will learn how to tackle these situations using...

Property Ordering in C# JSON Serialization

In this article, we are going to learn how to perform property ordering within JSON serialization using the two most famous JSON libraries for .NET. The libraries are System.Text.Json, which has been natively available in the framework since .NET Core 3.0, and...

Aggregate Design in .NET

In this article, we will learn what is an aggregate in Domain-Driven Design. We will get to know which are the main design principles behind it. We will, also, design and implement a simple use case using these principles and learn how to organize business logic and...

Different Ways to Split a String in C#

In this article, we will cover different ways to split a string in C#. As developers, we might often need to split strings into smaller substrings based on certain delimiters. C# provides us with the Split method, which is part of the String class. [sc name="github"...

Upcasting and Downcasting in C#

Upcasting and downcasting are important concepts in C# programming that allow us to convert an object of one type to another type. These concepts are essential to work with polymorphism and object-oriented programming. In this article, we will explore how upcasting...