scaffolding
dotnet/efcore/.agents/skills/scaffolding/SKILL.md
Implementation details for EF Core scaffolding (reverse engineering). Use when changing ef dbcontext scaffold pipeline implementation, database schema reading, CSharpModelGenerator, or related classes.
Skill15k starsChanged today
What's in it
- Scaffolding
- When Not to Use
- Reverse Engineering
- Schema Query Compatibility
--- name: scaffolding description: 'Implementation details for EF Core scaffolding (reverse engineering). Use when changing ef dbcontext scaffold pipeline implementation, database schema reading, CSharpModelGenerator, or related classes.' user-invocable: false --- # Scaffolding Generates C# code from database schemas (reverse engineering). ## When Not to Use - Working on compiled model generation (`dotnet ef dbcontext optimize`) ## Reverse Engineering Pipeline: `IDatabaseModelFactory` (reads schema) → `IScaffoldingModelFactory` (builds EF model) → `IModelCodeGenerator` (generates C#) - `IReverseEngineerScaffolder` — orchestrates full pipeline ## Schema Query Compatibility Provider schema readers often query one-to-many metadata tables. Preserve anti-semi semantics when adapting SQL for a limited engine: replacing `NOT EXISTS` with a `LEFT JOIN` plus a null filter is incorrect when an object can have multiple metadata rows, even when the excluded-property predicate is in the join condition. The excluded row does not join but an unrelated row does; its non-null joined key keeps the object in the result. Prefer an equivalent non-correlated anti-set form, such as `NOT IN (SELECT key ... WHERE excluded-condition)`, when nullability and key semantics permit it.
More agent context in dotnet/efcore
16 other files this repository gives its agents.
Copilot instructions
Skill
- change-tracking.agents/skills/change-tracking/SKILL.md
- code-review.agents/skills/code-review/SKILL.md
- cosmos-provider.agents/skills/cosmos-provider/SKILL.md
- make-custom-agent.agents/skills/make-custom-agent/SKILL.md
- make-github-actions-workflow.agents/skills/make-github-actions-workflow/SKILL.md
- make-instructions.agents/skills/make-instructions/SKILL.md
- make-skill.agents/skills/make-skill/SKILL.md
- migrations.agents/skills/migrations/SKILL.md
- model-building.agents/skills/model-building/SKILL.md
- run-apichief.agents/skills/run-apichief/SKILL.md
- servicing-pr.agents/skills/servicing-pr/SKILL.md
- sqlite-adonet.agents/skills/sqlite-adonet/SKILL.md
- tooling.agents/skills/tooling/SKILL.md
- triage.agents/skills/triage/SKILL.md
- update-pipeline.agents/skills/update-pipeline/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool registry_write, action report. How to connect one.

