Entity Framework Core 10 from model to production: modelling and migrations, LINQ translation and loading strategies, change tracking, advanced mapping and concurrency, performance, and running EF Core safely in production on SQL Server.
-
How do you generate realistic test data for EF Core integration tests without copying production data?
Junior
Theory
Production EF
-
How would you move a large tenant from a shared database to its own Azure SQL database with minimal downtime?
Staff / Architect
Architecture
Production EF
-
How do you run EF Core migrations with zero downtime? Explain the expand/contract pattern, how you handle a column rename, adding a NOT NULL column to a large table, backfilling data, and the fact that the old and new app versions run against the same database at once.
Zero-downtime EF Core schema changes on Azure SQL: expand/contract, renames, NOT NULL columns, backfills, and keeping two app versions compatible with one schema.
Senior
Theory
Production EF
Β· π 3 follow-ups Β· π 1 real-world
-
An EF Core migration failed halfway through in production and the API is throwing errors. What is your rollback strategy? Compare running the Down migration, writing a forward fix and Azure SQL point-in-time restore, and explain how idempotent scripts and transactions change what state you are left in.
Recovering from a partly applied EF Core migration on Azure SQL: assessing state, forward fix vs Down migration vs point-in-time restore, idempotent scripts, transactional DDL and prevention.
Senior
RealWorldScenario
Production EF
Β· π 3 follow-ups Β· π 1 real-world
-
How do you seed data in EF Core 10? Explain HasData, the UseSeeding and UseAsyncSeeding methods added in EF Core 9, and how you treat reference data differently from test or demo data.
Seeding in EF Core 10: model-managed HasData, UseSeeding/UseAsyncSeeding, custom initialisation, and keeping reference, test and demo data separate.
Junior
Theory
Production EF
Β· π 2 follow-ups
-
Show how you would implement multi-tenancy in EF Core with a tenant id on every row, a global query filter and a tenant provider. Where does the tenant id come from, how do inserts get it, and what are the risks with IgnoreQueryFilters, DbContext pooling and background jobs?
Shared-schema multi-tenancy in EF Core 10: TenantId columns, a named global query filter, a scoped tenant provider, stamping inserts, and the leaks caused by IgnoreQueryFilters, pooling and jobs without a request.
Mid-Level
Coding
Production EF
Β· π 3 follow-ups Β· π 1 real-world
-
Show how you would implement soft delete in EF Core: a global query filter, an interceptor that turns deletes into updates, unique indexes that ignore deleted rows, what happens to cascades, and how you restore or permanently purge data.
Soft delete in EF Core 10: ISoftDelete, a named query filter, a SaveChangesInterceptor converting Deleted to Modified, filtered unique indexes, cascade behaviour, restore and purge, and where it is bypassed.
Mid-Level
Coding
Production EF
Β· π 3 follow-ups Β· π 1 real-world
-
Show how you would maintain audit columns such as CreatedAt, CreatedBy, ModifiedAt and ModifiedBy automatically in EF Core using a SaveChangesInterceptor and TimeProvider. What does it miss, how do you test it, and when would you use SQL Server temporal tables instead?
Audit columns in EF Core 10 with an IAuditable interface, a SaveChangesInterceptor, TimeProvider and a current-user service; lifetimes with pooling, gaps (ExecuteUpdate, raw SQL), testing, and temporal tables as the alternative.
Mid-Level
Coding
Production EF
Β· π 3 follow-ups Β· π 1 real-world
-
Where do you draw transaction boundaries in an ASP.NET Core service using EF Core? Explain one SaveChanges per use case, the DbContext-per-request lifetime, why you never hold a database transaction open across an HTTP call to another service, and how the outbox pattern keeps the database and a message broker consistent.
Transaction boundaries with EF Core 10 on Azure SQL: one SaveChanges per use case, scoped DbContext, explicit transactions with execution strategies, no transactions around remote calls, and the transactional outbox.
Senior
Architecture
Production EF
Β· π 3 follow-ups Β· π 1 real-world
-
A customer reports seeing another tenant's records in your multi-tenant EF Core application, and you cannot reproduce it locally. How do you diagnose whether tenant state is leaking through DbContext pooling, a captured tenant provider or caching, and how do you fix and contain it?
Diagnosing an intermittent cross-tenant data leak in EF Core 10: pooled contexts keeping tenant state, singleton-captured tenant providers, model-baked filters and caches, with containment and Privacy Act obligations.
Senior
Debugging
Production EF
Β· π 3 follow-ups Β· π 1 real-world
-
You are designing the data architecture for a multi-tenant SaaS product on EF Core and Azure SQL. Compare a shared schema with a TenantId column, schema per tenant, and database per tenant (with elastic pools). How do you weigh isolation, cost, performance, migrations and operations, and how would you support tenants that need different levels of isolation?
Multi-tenant data architecture with EF Core 10 and Azure SQL: shared schema, schema per tenant and database per tenant with elastic pools, compared on isolation, noisy neighbours, cost, migrations, data residency and hybrid tiering.
Staff / Architect
Architecture
Production EF
Β· π 3 follow-ups Β· π 1 real-world