Joche Ojeda

Xari
Understanding the N+1 Database Problem using Entity Framework Core

Understanding the N+1 Database Problem using Entity Framework Core

The N+1 database problem is a performance killer that silently destroys application speed. This comprehensive test suite demonstrates how innocent-looking code can generate hundreds of unnecessary database queries instead of one efficient query. Through 12 detailed test cases using Entity Framework Core, we explore the difference between problematic lazy loading approaches that create 4+ queries and optimized solutions using Include() that require just 1 query. Real examples show 75% performance improvements, with actual SQL output revealing what happens under the hood. Learn projection, eager loading, split queries, and batch loading patterns to build applications that stay fast as they scale.

Building a Comprehensive Accounting System Integration Test – Day 5

Building a Comprehensive Accounting System Integration Test – Day 5

This article explores the implementation of a comprehensive integration test for an accounting system, demonstrating how Document and Chart of Accounts modules work together. Using a collection-based approach to simulate database interactions, the test validates double-entry accounting principles while ensuring proper transaction processing and balance verification across various business scenarios.