Unit Test – How to test a Private method in C#

By | 17/04/2024

In this post, we will see how to test a Private method in C#, using Reflection.In unit testing, the conventional wisdom is to test the public interface of a class. This means that private methods, which are implementation details, are typically tested indirectly through public methods. However, there are times when we might want to… Read More: Unit Test – How to test a Private method in… »

Python – Dockerizing a FastAPI application

By | 27/03/2024

In this post, we will see how to dockerizing the FastAPI application that we created in this previous post. First of all, we create a requirement.txt file where we will insert all libraries that we need to install to use the application: [REQUIREMENTS.TXT] Then, we create the dockerfile: [DOCKERFILE] Finally, to avoid unnecessarily copying everything… Read More: Python – Dockerizing a FastAPI application »

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: Design Patterns – Asynchronous Factory »

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: C# – Concurrent collections »

Category: C#

Swift – SwiftData

By | 28/02/2024

In this post, we will see how to use SwiftData in our projects.But, first of all, what is SwiftData?SwiftData is an Apple’s new data modeling and persistence framework, that offers a streamlined and modern approach to managing data. Unlike its more complex predecessor, Core Data, SwiftData emphasizes ease of use, type safety, and seamless integration… Read More: Swift – SwiftData »