Web API – Resource Filter

By | 03/11/2021

In this post, we will see how to create Resource Filter in a .NET 5 Web API project.First of all, what is a Resource Filter?“A Resource filter is the first to handle a request after authorization. It can run code before the rest of the filter pipeline, and after the rest of the pipeline has… Read More »

Web API – Action Filter

By | 27/10/2021

In this post, we will see how to create an Action Filter in a .NET 5 Web API project.First of all, what is an Action Filter?“An Action filter runs the code immediately before and after the controller action method is called. It can be used to perform any action before or after execution of the… Read More »

Web API – OData with .NET 5

By | 20/10/2021

In this post, we will see how to implement OData with .NET 5.First of all, what is OData?From OData.org:“OData (Open Data Protocol) is an ISO/IEC approved, OASIS standard that defines a set of best practices for building and consuming RESTful APIs. OData helps you focus on your business logic while building RESTful APIs without having to worry about… Read More »

C# – How to return a value from a Thread

By | 13/10/2021

In this post, we will see how to return a value from a Thread. First of all, we create a new Console application project where we define three methods called Method1, Method2 and Method3: Then, we modify the Main method in order to run the first two methods in different Threads: If we run the… Read More »

Category: C#

Web API – Custom Data Annotation

By | 06/10/2021

In this post, we will see how to create a Data Annotation custom to use in a .NET 5 Web API project.First of all, what is a Data Annotation?From Microsoft web site:“The advantage of using the Data Annotation validators is that they enable you to perform validation simply by adding one or more attributes –… Read More »

Azure – How to use Azure Key Vault

By | 29/09/2021

In this post, we well see how to use Azure Key Vault in a console application, in order to store and retrieve a connection string.First of all, what is Azure Key Vault?From Microsoft web site:“Azure Key Vault is a cloud service that provides a secure store for secrets. You can securely store keys, passwords, certificates,… Read More »

C# – Joining Threads

By | 22/09/2021

In this post, we will see how to use the Join method with the Threads in order to allows one thread to wait until another completes the execution. We start creating a Console application where we add three methods in Program.cs called Method1, Method2 and Method3: Then, we modify Main method in order to run… Read More »

Category: C#

C# – Yield

By | 15/09/2021

In this post, we will see how to use the Yield keyword in a C# application.But first of all, what is Yield?From Microsoft web site:“When you use the yield contextual keyword in a statement, you indicate that the method, operator, or get accessor in which it appears is an iterator. Using yield to define an… Read More »

Category: C#

C# – Introduction to Multithreading

By | 08/09/2021

In this post, we will see how to use multithreading in C# in order to have best performances in our applications.Multithread is a very big argument and in this first post, we will just see how to start working with it. But first of all, what does Multithreading mean?From Microsoft web site:“A process is an… Read More »

Category: C#