/net10-data:efcore-10from net10-data
Use when writing or reviewing Entity Framework Core 10 code in a project that targets net10.0: LINQ joins (LeftJoin, RightJoin, full outer join), "top by"/MaxBy queries, ExecuteUpdateAsync / ExecuteDeleteAsync, query filters (soft delete, multi-tenant), complex types and JSON columns, Contains over a list, SQL Server json/vector types, EF Core 9 to 10 breaking changes. USE FOR: "left join", "full outer join", "FullJoin", "MaxBy", "bulk update", "SetPropertyCalls", "HasQueryFilter", "IgnoreQueryFilters", "OwnsOne ToJson", "ComplexProperty", "ComplexCollection", "SqlVector", "OPENJSON", "UNION ALL", "Unable to translate set operation". DO NOT USE FOR: projects on net11.0 / EF Core 11 (FullJoin and MaxByAsync exist there), EF6 (.NET Framework), or query performance reviews (use optimizing-ef-core-queries).
Ships in net10-data. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
EF Core 10 is the LTS release that ships with .NET 10. Models have now seen EF Core 11 previews, so the two failure modes are: using EF Core 11 APIs that do not exist here, and writing EF Core 6-9 era code where EF Core 10 has a direct operator.
Microsoft.EntityFrameworkCore.* 10.0.x and targets net10.0.
If it targets net11.0, this skill does not apply.dotnet run <net10-guardrails>/scripts/api-exists.cs -- Queryable.FullJoin --project <your.csproj>| Need | EF Core 10 API |
|---|---|
| Left / right outer join | outer.LeftJoin(inner, o => key, i => key, (o, i) => ...), RightJoin(...) → LEFT JOIN / RIGHT JOIN. Always pass a result selector. |
| Full outer join | No FullJoin. LeftJoin(...) + Concat(unmatched right side) → one UNION ALL statement (see gotchas) |
| Row with the max/min key | OrderByDescending(k).ThenBy(x => x.Id).FirstOrDefaultAsync() |
| Conditional bulk update | ExecuteUpdateAsync(s => { s.SetProperty(...); if (x) s.SetProperty(...); }) (statement lambda) |
| Several query filters | HasQueryFilter("SoftDelete", ...), HasQueryFilter("Tenant", ...), then IgnoreQueryFilters(["SoftDelete"]) |
| Value object in a JSON column | ComplexProperty(c => c.Address, b => b.ToJson()); collections: ComplexCollection(o => o.Lines, b => b.ToJson()) |
| Optional value object | Address? BillingAddress complex property (needs at least one required member) |
Contains over a local list | Default is now IN (@ids1, @ids2, ...) (padded). Control: UseParameterizedCollectionMode(ParameterTranslationMode.Constant/Parameter/MultipleParameters) or per query EF.Constant(ids) / EF.Parameter(ids) |
| SQL Server 2025 / Azure SQL | json column type by default with UseAzureSql or UseCompatibilityLevel(170); SqlVector<float> + EF.Functions.VectorDistance("cosine", col, v) (exact search) |
Compiled examples: examples/Queries.cs, examples/BulkUpdates.cs, model in examples/ShopDb.cs. They run against SQLite in the tree's runtime checks.
LeftJoin/RightJoin over GroupJoin + SelectMany + DefaultIfEmpty in method syntax.
(Query syntax from ... join ... into cannot express LeftJoin; keep it only where it already exists.)ExecuteUpdate support,
compared by value in LINQ). Exception: on Cosmos DB keep owned types; complex types arrive there in EF Core 11.HasQueryFilter call silently replaces the first.AsAsyncEnumerable(); never ToAsyncEnumerable() (that is the BCL's in-memory operator).Concat: project with an object initializer, not a constructor.
new Row(o.Id, ...) fails at runtime: "Unable to translate set operation after client projection has been
applied". Use a DTO with init properties: new Row { OrderId = o.Id, ... }.Concat/Union must assign the same members, nulls included
(OrderId = null, OrderNumber = null, ...). Otherwise: "Unable to translate set operations when both sides
don't assign values to the same properties".db.Customers.MaxByAsync(...) does not compile on EF Core 10 (CS1061; CS0411 when a .NET 11 SDK compiles it). Do not "fix" it with
AsAsyncEnumerable().MaxByAsync(...): it compiles against System.Linq.AsyncEnumerable, streams the whole
table to the client, and navigations such as c.Orders are not loaded, so the result is silently wrong.Queryable.MaxBy/MinBy compile (BCL since .NET 6) but EF Core 10 cannot translate them:
InvalidOperationException at runtime.ExecuteUpdate code from EF 7-9 no longer compiles: SetPropertyCalls<T> is gone, and the
setters parameter is Action<UpdateSettersBuilder<T>>, not an expression tree. Use the statement lambda.ExecuteUpdate on JSON data works only for complex types, not for owned ToJson() entities.System.Linq.Async package: .NET 10 ships System.Linq.AsyncEnumerable in the BCL; the old package
causes ambiguous-call errors. Remove it (or <ExcludeAssets>compile</ExcludeAssets> when transitive).GetDateTimeOffset, GetDateTime,
DateTimeOffset in REAL columns). Last-resort switch: AppContext.SetSwitch("Microsoft.Data.Sqlite.Pre10TimeZoneHandling", true).nvarchar(max) JSON columns to
json. Opt out with UseCompatibilityLevel(160) or HasColumnType("nvarchar(max)").dotnet ef ... needs --framework net10.0.| EF Core 11 | EF Core 10 instead |
|---|---|
FullJoin(...) (any LINQ provider) | LeftJoin + Concat (above), or Database.SqlQuery<T>($"... FULL JOIN ...") |
MaxByAsync / MinByAsync, translated MaxBy/MinBy | OrderByDescending(...).ThenBy(...).FirstOrDefaultAsync() |
LeftJoin/RightJoin without a result selector (tuples), or with IEqualityComparer | pass (o, i) => new { o, i } |
VectorSearch(...), WithApproximate(), HasVectorIndex(...) | exact OrderBy(e => EF.Functions.VectorDistance(...)).Take(k); index via raw SQL |
FreeTextTable / ContainsTable, HasFullTextIndex/HasFullTextCatalog | EF.Functions.FreeText/Contains; DDL via migrationBuilder.Sql(...) |
EF.Functions.JsonContains, JsonPathExists, JSON indexes | Contains on primitive collections (OPENJSON) or raw SQL |
Keys/indexes on complex-type members, Property(e => e.Details.Description) chaining | promote to a scalar property; ComplexProperty(e => e.Details).Property(d => d.Description) |
DbQueryConcurrencyException | does not exist; for split queries use AsSingleQuery() or a snapshot transaction |
HasPeriodStart(e => e.PeriodStart) lambda overloads | shadow properties: EF.Property<DateTime>(e, "PeriodStart") |
dotnet ef database update X --add, .config/dotnet-ef.json | migrations add then database update, pass --project/--startup-project/--framework |
Full tables (legacy patterns, every EF Core 10 breaking change, Cosmos specifics): references/efcore-10-reference.md.
optimizing-ef-core-queries (Microsoft): performance and correctness review of EF Core queries.create-datadriven-aspnetcore (Microsoft): scaffolding CRUD pages/endpoints over a DbContext.efcore-patterns (community): DbContext lifetime, repositories, migrations workflow. It suggests the InMemory
provider for tests; prefer SQLite in-memory or testcontainers-integration-tests for relational behavior.migrate-dotnet9-to-dotnet10 (Microsoft): the full .NET 9 → 10 upgrade, EF included.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub codehepta/net10-skills --plugin net10-data4 skills in this plugin
/create-datadriven-aspnetcoreGenerate or scaffold ASP.NET Core code — Razor Pages, Blazor components, MVC controllers, views, and Minimal API endpoints — without using ASP.NET Core CLI scaffolding/code-generation tools. Use when (1) adding CRUD pages, views, or API endpoints backed by Entity Framework (EF Core) and a database, (2) generating code to create, read, update, and delete data using a DbContext, (3) scaffolding UI components that match the project's existing CSS framework and coding patterns, or (4) creating data-driven forms, tables, and navigation for a model class. Do not use for non-ASP.NET projects or when CLI-based scaffolding is preferred./efcore-patternsEntity Framework Core best practices including NoTracking by default, query splitting for navigation collections, migration management, dedicated migration services, and common pitfalls to avoid./optimizing-ef-core-queriesOther plugins' skills for the same job