Tag Archives: C#

C# – Reflection

By | 20/11/2024

In this post, we will see what Reflection is and how use it in our programs.But first of all, what is Reflection?“Reflection is part of the System.Reflection namespace in C# that enables us to analyse assemblies and types, create instances dynamically, access properties and fields, invoke methods, and even discover custom attributes. Through reflection, we… Read More »

Category: C# Tags:

C# – Management of a SQLite database

By | 06/11/2024

In this post, we will see how to create and manage a SQLite database using C#. We will create a minimal API to use the database, implement a repository pattern to abstract database operations and finally, we will write unit tests to verify our code.The SQLite database we will use is named TestDb and it… Read More »

Category: C# Tags:

Design Patterns – Asynchronous Factory

By | 13/03/2024

In this post, we will see how to use the Asynchronous Factory Method pattern in our project.But first of all, what is Asynchronous Factory Method and why should we use it?“In many applications, especially those that involve database operations, initializing data asynchronously during startup is a common requirement. However, constructors in C# do not support… Read More »

C# – Concurrent collections

By | 06/03/2024

In this post, we will see some concurrent collections that we could use in our multi-threaded application where, managing shared data between threads, can introduce complexity and potential error such as race conditions or deadlocks. .NET addresses these cases with its concurrent collections, found in the System.Collections.Concurrent namespace. These collections are designed to be thread-safe… Read More »

Minimal APIs – Serilog

By | 07/02/2024

In this post, we will see how to use Serilog in our Minimal APIs projects.Serilog is a diagnostic logging library fro .NET applications and we have seen it in the post:C# – Serilog.The Minimal API project that we are going to use here, is the project that we have used in all previous Minimal APIs’… Read More »

C# – Serilog

By | 24/01/2024

In this post, we will see how to use Serilog in our .net applications.But first of all, what is Serilog?Serilog is a diagnostic logging library for .NET applications. It is designed to be easy to configure and extend, offering a rich set of sinks (outputs) and enrichers. One of the key features of Serilog is… Read More »

Category: C# Tags: