1325 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.
DbContext, DbSet, entities, model configuration, migrations, relationships, keys and foreign keys, shadow properties, value converters, owned entities, complex types and backing fields in EF Core 10.
Covers EF Core shadow properties (EF.Property, audit and FK uses), backing fields and property access modes, and mapping encapsulated read-only collections in DDD aggregates.
Covers EF Core value converters (HasConversion, built-in and custom ValueConverter), enums as strings, strongly typed IDs with record structs and ConfigureConventions, value comparers for mutable types, why Money fits a complex type better, and query translation pitfalls.
Covers mapping value objects in EF Core 10: owned entity types (OwnsOne, OwnsMany, hidden keys, reference semantics), complex types (ComplexProperty, value semantics, optional and collection support, JSON mapping in EF Core 10), table splitting and ToJson, and the current recommendation.
Covers debugging EF Core migrations: why the differ scaffolds drop and add instead of a rename, the data-loss warning, editing a migration to RenameColumn, and the EF Core 9+ PendingModelChangesWarning including non-deterministic seed data.
A senior code review of an EF Core model configuration covering a hard-coded connection string in OnConfiguring, lazy loading proxies, nvarchar(max) strings, cascade delete everywhere and random GUID clustered keys, ranked by severity with a rewrite.