Latest Posts On Code Maze

Code Maze Weekly #143

Code Maze Weekly #143

Issue #143 of the Code Maze weekly. Check out what's new this week and enjoy the read. .NET and C# Top Picks Add MS SQL Server JSON Support To Entity Framework Core [khalidabuhakmeh.com] Many software developers use Entity Framework Core with MSSQL daily, but not too...

Boosting Performance With Sealed Classes in .NET

Boosting Performance With Sealed Classes in .NET

In this article, we are going to learn how we can boost performance with sealed classes in our .NET projects. By default, all classes in C# are open for inheritance. We can use the sealed keyword to prevent inheriting from the class and improve performance for certain...

Performance Testing of ASP.NET Core APIs With k6

Performance Testing of ASP.NET Core APIs With k6

In this article, we are going to discuss how to do ASP.NET Core Performance Testing, specifically with the open-source tool k6. We'll cover the need for performance testing, how to get the best results, and then dive into some examples of how k6 can help. Everyone loves LINQ. It's one of the best additions .NET ever got, so make...

Path Class in C#

Path Class in C#

When we want to perform operations on path strings containing file or directory path information, the best choice is to call the built-in C# Path Class methods. This class comes under the System.IO namespace and System.Runtime.dll assembly. In this article, we are...

What is the Difference Between a DTO and a POCO?

What is the Difference Between a DTO and a POCO?

In this article, we are going to learn the differences between a DTO (Data Transfer Object) and a POCO (Plain Old CLR/C# Object). We use these types of objects in everyday coding. However, we are often not sure what the real differences are. We are going to dive...

Code Maze Weekly #141

Code Maze Weekly #141

Issue #141 of the Code Maze weekly. Check out what's new this week and enjoy the read. .NET and C# Top Picks ASP.NET Core rate limiting middleware in .NET 7 [blog.maartenballiauw.be] With .NET 7 we're finally getting the in-build rate-limiting middleware. Let's see...

Using Query String Parameters with Minimal APIs

Using Query String Parameters with Minimal APIs

In this article, we are going to explain how we can work with query string parameters in Minimal APIs in .NET 6. You may refer here for a nice introduction to the concept of Minimal APIs. Also, we will show new improvements that .NET 7 brings to the table. If downloading files in ASP.NET Core MVC is something you're planning to implement, or have had...

Indexers in C#

Indexers in C#

In this article, we are going to learn about Indexers in C#, how to declare them in a class, struct, or interface, and overload them. We're also going to learn what the differences between indexers and properties are. [sc name="github"...

Return File in ASP.NET Core Web API

Return File in ASP.NET Core Web API

In this article, we are going to learn how to return a file in an ASP.NET Core Web API and some concepts behind it. That said, we are going to implement a simple Web API to read a local file and return this file to download. [sc name="patreon-source-code"...

Improving Unit Tests with Fluent Assertions

Improving Unit Tests with Fluent Assertions

Unit tests are usually a must-have part of building and maintaining a software application. Fluent Assertions is a wonderful library of extension methods. Due to the nature of the library, the code reads like a written sentence. In this article, we will review many...