Tag Archives: Web API

C# – Task and Cancellation Token

By | 20/07/2022

In this post, we will see how to use a Cancellation Token in a Task.But first of all, what is a Cancellation Token?From Microsoft web site:“A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects“.In a nutshell, when we run a Task and we decide to cancel it, using a cancellation token we will stop… Read More »

Web API – Minimal API with ASP.NET Core

By | 26/01/2022

In this post, we will see how to create a Minimal API with .net Core.But first of all, what is a Minimal API?From Microsoft web site:“Minimal APIs are architected to create HTTP APIs with minimal dependencies. They are ideal for microservices and apps that want to include only the minimum files, features, and dependencies in… Read More »

Web API – Health Checks

By | 15/12/2021

In this post, we will see how to configure and use Health Checks in a Web API .NET Core project.But first of all, what are the Health Checks?From Microsoft web site:“ASP.NET Core offers Health Checks Middleware and libraries for reporting the health of app infrastructure components.Health checks are exposed by an app as HTTP endpoints.… Read More »

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 »