Posts

ASP.NET Core 9 API: Using FusionCache in an ASP.NET Core Minimal API

Image
Using FusionCache in an ASP.NET Core Minimal API This article explains how the current Core_FusionCache application uses FusionCache with ASP.NET Core Minimal APIs, Entity Framework Core, SQL Server, and Redis. The application exposes product CRUD endpoints, reads product data from the Products table, caches read responses, and invalidates stale cache entries after write operations. Figure 1: FusionCache read and write flow used by this application. What is FusionCache? FusionCache is an advanced caching library for .NET applications. It gives an application a single cache API while supporting useful production features such as in-memory caching, distributed caching, fail-safe behavior, cache stampede protection, eager refresh, serialization, and backplane notifications. In this application, FusionCache is configured as a two-level cache: L1 cache: a fast in-memory cache inside the running ASP.NET Core proce...

ASP.NET Core 10 New Validation Features in Minimal APIs

Image
ASP.NET Core 10 New Validation Features in Minimal APIs ASP.NET Core 10 introduces built-in validation support for Minimal APIs. This is one of an important improvement because Minimal APIs can now validate incoming request data automatically before endpoint logic runs. In the sample API, validation is enabled by using the following line: builder.Services.AddValidation(); Once validation is enabled, ASP.NET Core can validate request body models, query string values, route values, and headers using familiar Data Annotations attributes such as [Required] , [Range] , [StringLength] , [EmailAddress] , and [RegularExpression] . What Are the New ASP.NET Core 10 Validation Features? ASP.NET Core 10 adds automatic validation support for Minimal API endpoints. Earlier, automatic validation was commonly associated with MVC controllers and the [ApiController] attribute. Minimal APIs were lightweight and simple, but developers often had to wri...

ASP.NET Core 9: Building a Order Processing Application with ASP.NET Core 9 and TickerQ

Image
In this article, we will build a complete Order Processing Application using ASP.NET Core 9 with TickerQ — a modern, source-generated background job scheduler for .NET. The application demonstrates how to accept orders through a web UI, store them in SQL Server, and automatically process them on a timed schedule using TickerQ's cron-based execution engine. What is TickerQ? TickerQ is a high-performance, modern job scheduler for .NET applications. Unlike traditional approaches such as IHostedService with Timer , or Hangfire, TickerQ leverages source generators at compile time — meaning zero runtime reflection, full AOT compatibility, and maximum performance. TickerQ supports two types of scheduled jobs: Time Tickers — One-off jobs scheduled to run at a specific future time. Cron Tickers — Recurring jobs defined using cron expressions (e.g., */1 * * * * for every minute). Key features of TickerQ include: Source-generated function registration : No ma...