2026-07-19 ef-coredotnetcsharp How to log the SQL that EF Core 11 generates See the exact SQL Entity Framework Core 11 sends to your database, with parameter values, using LogTo, Microsoft.Extensions.Logging, and ToQueryString.
2026-07-17 errorscsharpdotnet Fix: "The property could not be mapped, because it is not a supported primitive type or a valid entity type" in EF Core 11 EF Core hit a property it does not know how to store. Map it as a complex type, convert it with HasConversion, give it a key, or ignore it with [NotMapped].
2026-07-13 ef-coreef-core-11inheritance How to configure table-per-hierarchy (TPH) inheritance mapping in EF Core 11 TPH is EF Core's default inheritance strategy: one table, one discriminator column. Here is how to configure the discriminator, share columns, handle nullable derived properties, and the gotchas on EF Core 11.
2026-07-12 ef-coreef-core-11complex-types How to map a complex type instead of an owned entity in EF Core 11 Owned entities carry a hidden key and reference identity that fights value objects. Here is how to map a value object as a complex type in EF Core 11, when to switch, and the gotchas.
2026-06-26 errorscsharpdotnet Fix: FOREIGN KEY constraint failed when deleting an entity in EF Core 11 EF Core throws FOREIGN KEY constraint failed because the parent still has dependents the database refuses to orphan. Load the children, make the relationship optional, or configure OnDelete.
2026-06-26 errorscsharpdotnet Fix: No service for type 'Microsoft.EntityFrameworkCore.DbContextOptions' has been registered EF Core throws this when AddDbContext never ran, ran after Build, or your context's constructor takes the wrong DbContextOptions. Register before Build and use DbContextOptions<YourContext>.
2026-06-25 errorscsharpdotnet Fix: The seed entity for entity type 'X' cannot be added because a non-zero value is required for property 'Id' HasData seeds an entity with a store-generated key but no explicit value. Give every seed row a stable non-zero Id, or switch to UseSeeding for generated keys.
2026-06-23 how-toef-coreef-core-11 How to do keyset (cursor) pagination in EF Core 11 Replace Skip/Take with a WHERE clause that seeks past the last row you saw. Order by a fully unique key, carry the last row's values as a cursor, and EF Core 11 turns the next page into an index seek instead of an OFFSET scan.
2026-06-23 how-toef-coreef-core-11 How to map and query JSON columns in EF Core 11 Map a nested type to a single JSON column with ComplexProperty(...).ToJson(), let EF Core 11 store it in the native SQL Server 2025 json type, then query into it with LINQ that translates to JSON_VALUE, JSON_CONTAINS, and JSON_PATH_EXISTS.
2026-06-15 comparisonef-coreef-core-11 AsNoTracking vs AsNoTrackingWithIdentityResolution in EF Core 11: which should you use? Use AsNoTracking for read-only queries by default. Reach for AsNoTrackingWithIdentityResolution only when the result graph contains the same entity more than once and your code depends on getting a single shared instance back.