STRUCTURED COURSE

ASP.NET Core Performance Optimization

Learn how to analyze and improve ASP.NET Core application performance. Apply async/await, Entity Framework Core query optimization, caching, response compression, connection pooling, pagination, and performance measurement techniques through real-world scenarios.

13 lessons 715 dk MemoryCache / Distributed Cache / Redis / Response Compression / BenchmarkDotNet
ASP.NET Core Performance Optimization

In this course series, we will explore practical techniques for improving ASP.NET Core application performance through real-world project examples. We will cover async/await, Entity Framework Core query optimization, the N+1 problem, AsNoTracking, projections, pagination, caching, response compression, connection pooling, memory usage, and API performance. We will also learn how to measure performance, identify bottlenecks, and verify whether optimizations actually improve the application. The goal is to build ASP.NET Core applications that are not only fast, but also efficient, scalable, and maintainable.

What you will learn

Identify ASP.NET Core performance bottlenecks, use async/await correctly, optimize EF Core queries, solve N+1 problems, use AsNoTracking and projections, implement pagination and caching, apply response compression, understand connection pooling, reduce unnecessary memory usage, improve API response times, and measure optimization results.
CURRICULUM

Course lessons

13 lessons
  1. 1Project Foundation, Performance Goals, and Measurement FundamentalsCreate the shared e-commerce Web API with .NET 10, EF Core, and SQL Server; establish the layered structure and record baseline measurements.75 dk
  2. 2Async/Await and Concurrency in the ASP.NET Core Request PipelineLearn how to use async/await across ASP.NET Core request layers, remove synchronous blocking, propagate CancellationToken, and measure the performance impact.45 dk
  3. 3EF Core Query Analysis, Generated SQL, and IndexingInspect SQL generated by EF Core, identify slow queries with logging and execution plans, and improve SQL Server query performance with appropriate indexes.45 dk
  4. 4AsNoTracking, Projections, and Reducing Unnecessary Data TransferLearn how to use AsNoTracking and DTO projections for read-only queries, reduce change-tracker and entity-graph costs, and compare alternative EF Core queries with BenchmarkDotNet.40 dk
  5. 5The N+1 Problem and Efficient Loading of Related DataThis lesson explains how the N+1 problem appears in product, category, and order relationships and compares eager loading, split queries, explicit loading, and projection strategies in EF Core.35 dk
  6. 6Pagination, Filtering, and Managing Large Result SetsAdd safe offset pagination, filtering, sorting, and search to a product-listing API while measuring query time, response size, and memory usage for large result sets.55 dk
  7. 7API Response Design, Serialization, and Reducing Unnecessary WorkLearn to design performance-oriented API response models, avoid returning entities, configure System.Text.Json, and measure serialization costs.55 dk
  8. 8In-Process Caching with MemoryCacheLearn how to cache frequently accessed category and product data with IMemoryCache and GetOrCreateAsync, apply expiration strategies, handle cache stampede and stale data, and measure API performance improvements.35 dk
  9. 9Scalable Caching with Distributed Cache and RedisThis lesson explains IDistributedCache and Redis integration, cache-aside, JSON serialization, TTL, invalidation, multi-instance behavior, and Redis failure handling in ASP.NET Core.45 dk
  10. 10Response Compression and HTTP-Level PerformanceLearn how to configure ASP.NET Core Response Compression with Brotli and Gzip, inspect Accept-Encoding behavior, and measure compression benefits.45 dk
  11. 11DbContext Lifetime, Connection Pooling, and Database ResourcesLearn how to manage DbContext lifetime, distinguish EF Core context pooling from ADO.NET connection pooling, and use database resources efficiently in ASP.NET Core.45 dk
  12. 12Memory Usage, Allocation Reduction, and Resource ManagementLearn to identify memory issues caused by large collections, unnecessary materialization, string allocations, and incorrect stream handling, then measure improvements with .NET diagnostics tools.45 dk
  13. 13API Performance Testing, Bottleneck Analysis, and the Final Optimization ProjectLearn how to create load and stress tests for the shared e-commerce API, collect performance metrics, classify bottlenecks, and validate optimization results.150 dk
Start the first lesson