Skip to content

Add lightweight EF Core relationship loading sample - #23

Merged
balajibashyam merged 3 commits into
mainfrom
feature/ef-core-relationships-sample
Aug 14, 2026
Merged

Add lightweight EF Core relationship loading sample#23
balajibashyam merged 3 commits into
mainfrom
feature/ef-core-relationships-sample

Conversation

@balajibashyam

Copy link
Copy Markdown
Contributor

Summary

Adds a minimal .NET 10 companion sample for the EF Core 8 Fundamentals: Modern Data Access with .NET 8 tutorial.

What's included

  • New sample: ef-core/modern-data-access-dotnet/ — 11 files

    • Required one-to-many (Category → TodoItem) and many-to-many (TodoItem ↔ Tag) modeling
    • Intentional N+1 baseline with DbCommandInterceptor SELECT counting
    • Eager Include loading categories in one query
    • Filtered Include loading only urgent tags
    • AsSplitQuery loading the complete graph in three queries
    • Explicit reference loading (conditionally loading Category)
    • AsNoTracking on read-only eager-loading paths
    • 8 deterministic xUnit v3 tests
  • Root README: New sample row + both EF Core companions in the tree

  • GitHub Actions: New test-ef-core-relationships job; path filters updated

Deliberately omitted (stays in the full tutorial or in the existing advanced EF Core companion)

Web API CRUD, migrations, owned/complex types, JSON, compiled queries, ExecuteUpdate/Delete, concurrency, transactions, retries, SQL Server, PostgreSQL, lazy-loading proxies, raw SQL, Testcontainers, benchmarks

Versions

  • .NET SDK: 10.0.302
  • Microsoft.EntityFrameworkCore.Sqlite: 10.0.11

Validation

  • dotnet restore — passed
  • dotnet build --configuration Release — passed (0 errors, 0 warnings)
  • dotnet test --configuration Release — passed (8/8)
  • Exact deterministic console output verified
  • Security scan — clean
  • Package baseline — 1 direct package
  • No SQLite database file generated

@balajibashyam
balajibashyam merged commit 0b795a4 into main Aug 14, 2026
25 checks passed
@balajibashyam
balajibashyam deleted the feature/ef-core-relationships-sample branch August 14, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant