Introduction
Graduate ShopNest to .NET 9 — OpenAPI improvements, Blazor updates, SignalR gains, HybridCache, performance wins, and a safe migration checklist from .NET 8.
After this article you will
- Summarize ASP.NET Core 9 highlights
- Migrate ShopNest using dotnet upgrade assistant
- Adopt HybridCache where applicable
- Review breaking changes
- Plan production rollout
Prerequisites
- Article 74 — Output Caching
- Articles 1–64 ShopNest foundations (MVC, EF Core, API, auth, deploy)
Architecture & design
Key .NET 9 / ASP.NET Core 9 highlights
- HybridCache — L1 memory + L2 distributed (Redis) unified API
- OpenAPI — improved built-in document generation
- Blazor — further Blazor United enhancements
- Performance — faster JSON, LINQ, GC improvements (benchmark your app)
- Minimal APIs — new binding and filter improvements
// HybridCache (.NET 9)
builder.Services.AddHybridCache(options =>
{
options.DefaultEntryOptions = new HybridCacheEntryOptions
{
Expiration = TimeSpan.FromMinutes(10),
LocalCacheExpiration = TimeSpan.FromMinutes(2)
};
});
// Migration
// dotnet tool install -g upgrade-assistant
// upgrade-assistant upgrade ShopNest.slnHands-on build guide — ShopNest Upgrade to .NET 9
- Retarget all projects to net9.0.
- Run full test suite; fix obsolete API warnings.
- Replace IMemoryCache+Redis dual usage with HybridCache on catalog.
- Deploy to staging slot; smoke test; swap production.
- Update GitHub Actions dotnet-version to 9.0.x.
Common pitfalls
- Skipping staging validation — breaking changes in third-party packages.
- Mixing net8 and net9 assemblies — retarget all projects together.
Interview & portfolio questions
Q: HybridCache benefit?
A: One API for local + distributed cache tiers — less boilerplate than IMemoryCache + IDistributedCache.
Q: Upgrade strategy?
A: Staging slot → automated tests → swap; keep rollback slot on net8 until stable.
Summary
- Article 75 completes the 75-lesson ShopNest track
- .NET 9 keeps ShopNest current for 2025+ hiring
- HybridCache + OpenAPI upgrades are quick wins
- Always test before production swap
Previous: Output Caching
Next: Take a .NET quiz
FAQ
LTS?
Check current .NET support policy — plan LTS vs STS for production.
Course complete?
Take the .NET quiz at /quizzes to validate your learning!