Code Maze Author

Ryan Miranda

Ryan is a tech enthusiast with over 15 years of diverse experience spanning various industries, team sizes, and project approaches. His focus is on big picture thinking, leading high performing engineering teams, and being an ambassador for technology to other business executives, effectively bridging the realms of technology and business.
Also find me here:


MY ARTICLES:

Onion Architecture vs Clean Architecture in .NET

Onion Architecture and Clean Architecture enforce the same rule: dependencies point inward, toward the domain. They differ in how they organise the code that obeys it. Onion arranges by layer; Clean arranges by use case. That difference is small enough that most teams...

Generate QR Codes With QRCoder in .NET

In this article, we will discuss how to generate QR codes, specifically with the .NET library QRCoder. We will generate basic QR codes that contain simple strings, discuss reading from and writing QR codes to a database, and try out real-life use cases, such as...

Monolith and Distributed Monolith Architectural Patterns in C#

In this article, we are going to discuss the monolith and distributed monolith architectural patterns. We'll cover what the patterns are, how to implement them in C#, and why we should use them over some other alternatives such as microservices. Let's start with a...

Discriminated Unions in C#

In this article, we will look at the usage of discriminated unions in C#, specifically with the open-source library OneOf. We'll go into some practical examples and why this pattern is becoming increasingly popular in .NET applications today. First, let's talk about...

Output Caching in ASP.NET Core

In this article, we are going to discuss how to implement Output Caching in ASP.NET. Output Caching is a first-class feature in ASP.NET Core 7. Previously we needed to implement these features ourselves, so it's beneficial that Microsoft has now built this...

Generating Source Code Documentation With DocFx

In this article, we are going to discuss the topic of source code documentation. We'll discuss why generating source code documentation is important and how DocFx helps with this task. [sc name="github"...

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. [sc...

How to Test a REST API with .NET and xUnit

In this article, we are going to cover how and why we should test a REST API with .NET and xUnit. We'll discuss why this is important, and how to actually test various components of an API response to ensure requirements are being met. [sc name="github"...

Using dotnet format Command to Format the C#/.NET Code

In this article, we are going to look into a global .NET tool called dotnet format, that helps with code styling in our .NET applications. We'll explore the basic usage, how the role of .editorconfig is important, and how to make the best use of the dotnet format in...

C# DateOnly and TimeOnly: How to Use and Convert Them

DateOnly holds a calendar date with no time attached. TimeOnly holds a time of day with no date attached. Both have been in .NET since version 6, and both exist because a birth date and an opening hour are not timestamps and should never have been stored as one....

Records in C#

In this article, we are going to discuss a new feature added in C#9, called "records". Records offer an alternative to classes and structs and offer a number of advantages over those types that we'll cover in this article. [sc name="github"...

.NET Collections – IEnumerable, IQueryable, ICollection

In this article, we are going to discuss three popular interfaces in the area of .NET collections. We all use collections every day in .NET, but do we really understand the difference between each of them, and when we should use one or another? Hopefully, at the end...

Code Coverage in .NET

In this article, we are going to explore the topic of code coverage in .NET and look at what tools we can use to understand and improve code coverage in the software we build. To download the source code for this article, you can visit our Code...

Elasticsearch in ASP.NET Core

In this article, we are going to use the popular open-source search and analytics engine - Elasticsearch to power a simple search system in ASP.NET Core. To download the source code for this article, visit Elasticsearch in ASP.NET Core...

FluentValidation Validators in C#: Built-in and Custom

FluentValidation validates .NET objects with rules written in code rather than attributes on the model. We declare a class deriving from AbstractValidator<T> and add one RuleFor() chain per property. The library ships validators for the cases we hit constantly:...