ASP.NET Core & C# Development
ASP.NET Core, Web APIs, Entity Framework, Dependency Injection, authentication and production-ready .NET development.
JWT Authentication in ASP.NET Core Web API: Access and Refresh Tokens
Most APIs need a way to identify their clients and protect resources from unauthorized access. JWT authentication provides a simple and widely used approach for handling this in stateless Web APIs.This article explains how JWT authentication works in ASP.NET Core and demonstrates its implementation step by step. For simplicity, we will assume that a user already exists in the database. User registration is outside the scope of this article. →
ASP.NET Core Request Lifecycle: Deep Dive from HTTP Request to Response
When we send a request to a .NET Core Web API, it goes through series of steps before a response is returned. Understanding this lifecycle is important in order to built what we need and how to use some of the prebuilt functionalities. Diagram bellow shows the entire request - response pipeline. →
API Versioning and Integration Testing in ASP.NET Core
In the previous post, we have paid attention on our project structure and organizing the code in multiple layers to achieve better readability and easier maintenance in the future. Now we can focus on long-term sustainability through versioning and testing. →
Global Exception Handling in ASP.NET Core APIs Using NLog
In the previous post, we set up a basic .NET 9 Web API project. Now it’s time to take things further by adding global error handling and logging to make our API more robust. →
Setting up production-ready ASP.NET Core Web APIs with FluentMigrator
Welcome to the first post in the “.NET Core Web API – Step-by-Step Best Practices” series. In this series, we’ll walk through building a modern, clean, and maintainable Web API using .NET 9. Each post will focus on a specific aspect, from project setup and architecture to migrations, logging, testing, and versioning. →
Dependency Injection with the Strategy Pattern in ASP.NET Core
In the previous post, we gave an introduction and explained the basic concept of the Strategy Pattern. Now, we want to go a bit further and demonstrate how it works in practice alongside a dependency injection in .NET Core. Instead of manually instantiating strategies, we let the ASP.NET Core DI container inject the correct implementation at runtime. →