Cancellation Tokens with IAsyncEnumerable
This article will remind us what cancellation tokens are and how to use them in C#. After that, we are going to talk about how we can use them with the IAsyncEnumerable interface and the cases when we should be careful while using them. To download...
Difference Between “throw” vs “throw ex” in C#
In this article, we are going to discuss a subtle, but hugely important subject - the difference between throw and throw ex. Understanding this simple distinction might save a significant amount of debugging time and stress. To download the source...
Dependency Injection Lifetimes in ASP.NET Core
While registering our services in the ASP.NET Core DI container, we can configure them with different lifetimes. In this article, we are going to talk about the different dependency injection lifetimes. To download the source code for this...
Using Multiple Databases in ASP.NET Core via Entity Framework Core
In this article, we are going to learn how to add multiple databases in the ASP.NET Core project using Entity Framework Core. We are going to show you how our repository pattern implementation helps us in the process by using abstractions that will hide all the...
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...
.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...
Google Sheets API with .NET Core
In this article, we’re going to explore the Google Sheets API using the Google Sheets Client Library for .NET. We’ll start with configuring the Google Sheets API in the Google developer console. Then we'll build an ASP.NET Core application that can read and write data...
IAsyncEnumerable with yield in C#
The support for Async Streams was one of the most exciting features that came out with .NET Core 3.0 and C# 8. This is possible with the use of IAsyncEnumerable with the yield operator. In this article, we are going to explore how to take advantage of this new feature...
CQRS Validation Pipeline with MediatR and FluentValidation
In this article, we are going to show you how to elegantly integrate a validation pipeline into our project using the MediatR and FluentValidation libraries. [sc name="patreon-source-code"...
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...
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...
Azure Table Storage with ASP.NET Core
In this article, we are going to learn about Azure Table Storage in depth. We’ll start by discussing the basic Azure Table Storage concepts and then see how to create an Azure Storage Account from the portal. After that, we’ll learn how to create an ASP.NET Core Web...
Introduction to System.Text.Json Through Examples
In this article, we are going to learn about the System.Text.Json library that helps us efficiently and easily handle JSON in our applications. So,...
Writing Logs to SQL Server Using NLog
We have previously learned how to log messages to a File using NLog. In this article, we are going to learn how to use Nlog to log messages into SQL Server. We are going to see how we can configure an ASP.NET Core Web API project to support NLog and how we can...
Azure Queue Storage with ASP.NET Core
In this article, we are going to learn Azure Queue Storage in depth. We’ll start with some introductory stuff about Azure Storage Queue and look at how to create one from the Azure Portal. After that, we’ll see how to build and deploy applications that can send and...
Dapper Migrations with FluentMigrator and ASP.NET Core
In this article, we are going to show you how to use the FluentMigrator library to create data migrations with Dapper and ASP.NET Core. In our previous article, where we learned a lot about Dapper and ASP.NET Core, we had to create our database and seed our data...
Azure BLOB Storage with ASP.NET Core and Angular
In this article, we are going to take a look at the Azure Storage Platform and learn how to work with Azure BLOB Storage. We’ll start with an introduction to the Azure Storage Platform. Then, we’ll look at the different types of storage services that Azure offers....
ASP.NET Core Middleware – Creating Flexible Application Flows
ASP.NET Core Middleware is software integrated inside the application's pipeline that we can use to handle requests and responses. When we talk about the ASP.NET Core middleware, we can think of it as a code section that executes with every request. In this article,...
Azure Active Directory B2C with Blazor WebAssembly Hosted Apps
In this article, we are going to learn how to use Azure Active Directory B2C to secure our Blazor WebAssembly Hosted application. We will see how to register both the server and the client app on the Azure Active Directory B2C tenant and how to integrate provided...
Onion Architecture in ASP.NET Core
In this article, we are going to learn about Onion architecture and what are its advantages. We will build a RESTful API that follows the Onion architecture, with ASP.NET Core and .NET. The Onion architecture is also commonly known as the “Clean architecture” or...
Using App Roles With Azure Active Directory and Blazor WebAssembly Hosted Apps
In the previous article, we've talked about securing our Blazor WebAssembly Hosted application with Azure Active Directory. So in this article, as a continuation, we are going to learn how to use App Roles from Azure Active Directory to provide a greater level of...




















