Course · 16 lessons

EF Core 10 Relational Data

Query and update a real SQLite database with explicit context, schema and concurrency contracts.

  1. One context for one owned unit of work

    Keep the database connection and each short-lived DbContext as separate owners.

    Contexts and querying · 30 min
  2. Keys, entity states and change detection

    Observe Added, Unchanged, Modified and Detached on a real tracked entity.

    Contexts and querying · 30 min
  3. Read-only queries and AsNoTracking

    Separate a materialized read model from a tracked update workflow.

    Contexts and querying · 30 min
  4. IQueryable translation and narrow projection

    Keep filtering in the provider query and inspect the materialized result.

    Contexts and querying · 30 min
  5. Relationships and enforced foreign keys

    Model a required relationship and verify the relational constraint.

    Contexts and querying · 30 min
  6. Loading related data without an N+1 loop

    Count actual SQL reader commands and choose a bounded projection.

    Contexts and querying · 30 min
  7. Async calls, cancellation and provider limits

    Forward a caller token while admitting SQLite’s synchronous I/O boundary.

    Reliable updates · 30 min
  8. Transaction boundaries and fresh verification

    Commit or roll back several real saves without confusing tracker state with storage.

    Reliable updates · 30 min
  9. Unique indexes and database rejection

    Treat uniqueness as a stored invariant and classify the actual provider exception.

    Reliable updates · 30 min
  10. Optimistic concurrency with a SQLite token

    Configure and advance an application-managed version instead of inventing rowversion support.

    Reliable updates · 30 min
  11. Stable pagination with a composite keyset

    Order uniquely and carry every cursor key into the next query.

    Modern relational boundaries · 30 min
  12. Migrations and EnsureCreated are different paths

    Apply genuine migration source and inspect its history on a disposable SQLite database.

    Modern relational boundaries · 30 min
  13. .NET10 LeftJoin translated by EF10

    Use the real new LINQ operator and verify a left join on SQLite.

    Modern relational boundaries · 30 min
  14. Named filters and a trusted tenant contract

    Disable soft deletion selectively without turning off tenant filtering.

    Modern relational boundaries · 30 min
  15. Factory leases and pooling state boundaries

    Use a real pooled context factory without pretending custom fields reset themselves.

    Modern relational boundaries · 30 min
  16. Capstone: one checked reservation unit of work

    Combine tenant-scoped lookup, atomic stock change, a unique reference and fresh verification.

    Modern relational boundaries · 30 min