Code Maze Author

Vladimir Pecanac

Hi, my name is Vladimir Pecanac, and I am a full-time .NET developer and DevOps enthusiast. I created this blog so I can share the things I learn in the hope of both helping others and deepening my own knowledge of the topics I write about. The best way to learn is to teach.
Also find me here:


MY ARTICLES:

C# Delegates

In this article, we're going to talk about C# delegates, which are a prerequisite for learning events-based programming. Delegates are one of the fundamental building blocks of flexible applications, as they can be found in the vast majority of .NET framework code...

Events in C#

Events in C# are a mechanism that classes use to send notifications or messages to other classes. They are a specialized delegate type that we use to notify other classes when something they listen to happens. Events are a vital part of many applications, and a...

10 Things You Should Avoid in Your ASP.NET Core Controllers

Keeping controllers clean and tidy is something we've learned we should do the first time we've stumbled upon the MVC pattern. But as the project grows and other team members enter the project, things might get out of hand. Especially when deadlines need to be met,...

ASP.NET Core Configuration – Azure Key Vault

In this article, we're going to talk about how to protect our sensitive configuration data in the production environment with Azure Key Vault. Previously we've talked about the Secret Manager and environment variables which we can use to protect our data while in...

Securing Sensitive Data Locally in ASP.NET Core

We've come to the most important part of this series - securing sensitive data when working with the configuration in ASP.NET Core. As software developers, we are responsible for the security of the applications we create, and it should be on top of our priorities...

Creating Custom Configuration Provider in ASP.NET Core

In this article, we are going to create a custom configuration provider that reads our configuration from the database. We've seen how the default configuration providers work, and now we're going to implement our own custom one. For the custom configuration provider,...

ASP.NET Core Configuration – Configuration Providers

In this article, we're going to talk about different configuration providers in ASP.NET Core. We've got used to using JSON as a default format for our configuration and it's the most commonly used format for configuring ASP.NET Core applications. But there's much more...

ASP.NET Core Configuration – Options Validation

In this article, we're going to learn the importance of options validation and a few ways to implement it in our ASP.NET Core applications. With advanced mechanisms like configuration reloading, we need to think about options validation carefully as we don't want to...

ASP.NET Core Configuration – Options Pattern

In this article, we're going to cover another way of reading configuration data in .NET Core - the options pattern. The options pattern helps us group related configuration settings, and it provides strongly typed access to them. We are going to learn how the options...

ASP.NET Core Configuration – Basic Concepts

In this introductory article, we are going to learn how ASP.NET Core configuration works, the basic configuration concepts, and a few different ways we can use to configure our application. Even by default, the configuration mechanism in .NET is pretty powerful, but...

Dependency Injection in ASP.NET Core

In this article, we're going to talk about dependency injection, one of the most frequently used design patterns out there. There are many tutorials about dependency injection, but in this one, we're going to focus on understanding why the dependency injection is used...

A Few Different Ways to Concatenate Strings in C#

In this quick tutorial, we are going to talk about different ways to concatenate strings. Splitting and joining strings are commonly used operations in almost any real-world application, so let's see how we can concatenate strings through some examples. We won't cover...

Differences between String and string in C#

In this article, we're going to tackle the popular question among many developers, and that's "What's the difference between string and String" and "When should I use string, and when should I use String" in my applications. Both of these versions exist for a reason,...

Implementing HATEOAS in ASP.NET Core Web API

In this article, we are going to talk about one of the most important concepts in building RESTful APIs - HATEOAS and learn how to implement HATEOAS in ASP.NET Core Web API. This article relies heavily on the concepts we've implemented so far in paging, filtering,...

Data Shaping in ASP.NET Core Web API

In this article, we are going to talk about a neat concept called data shaping and how to implement it in ASP.NET Core Web API. To achieve that, we are going to use similar tools as we did in the sorting article. Data shaping is not something that every API needs, but...

How to Implement Sorting in ASP.NET Core Web API

In this article, we're going to talk about sorting in ASP.NET Core Web API. Sorting is a commonly used mechanism, that every API should implement. Implementing it in ASP.NET Core is not difficult due to the flexibility of LINQ and good integration with EF Core. [sc...

Searching in ASP.NET Core Web API

In this article, we're going to tackle the topic of searching in ASP.NET Core Web API. Searching is one of those functionalities that can make or break your API, and the level of difficulty when implementing it can vary greatly depending on your specifications. If you...

Filtering in ASP.NET Core Web API

In this article, we will cover filtering in ASP.NET Core Web API. We'll learn what filtering is, how it's different from searching, and how to implement it in a real-world project. While not as critical as paging, filtering is still an important part of a flexible...

Paging in ASP.NET Core Web API

In this article, we're going to learn how to implement paging in ASP.NET Core Web API. Paging (pagination) is one of the most important concepts in building RESTful APIs. We don't want to return a collection of all resources when querying our API. That can cause...