Add EF Core and async safety instructions 🤖🤖🤖 - #3061
Open
recsventures-ops wants to merge 1 commit into
Open
recsventures-ops wants to merge 1 commit into
recsventures-ops wants to merge 1 commit into
Conversation
Pins .NET 8+ failures generic csharp.instructions.md does not: no .Result/.Wait, CancellationToken, AsNoTracking, N+1, pagination, DTO projection, thin controllers. MIT. No paid product mention.
aaronpowell
reviewed
Sep 17, 2026
aaronpowell
left a comment
Contributor
There was a problem hiding this comment.
Which models has the problem that the instructions are aiming to solve been observed on? I've not come across frontier models having any problems with EF that this skill would solve.
Additionally, there are EF-centric skills in https://github.com/dotnet/skills/tree/main/plugins/dotnet-data that might already tackle some of these problems.
Author
|
Thanks @aaronpowell — both points are fair.
Models: I have not run a systematic eval against named current
frontier models. The failures this file pins (.Result/.Wait(),
returning tracked entities from controllers, N+1 from missing
Include/Select, skipping AsNoTracking on reads) are ones I still see
from Copilot in VS/VS Code and from Cursor/Claude Code on ASP.NET Core
work. That is practitioner observation, not a measured “frontier
models still fail EF” claim, and I should not have written the file as
if it were. If the bar for this repo is named-model repros, I do not
have that artifact.
dotnet/skills: I read
https://github.com/dotnet/skills/tree/main/plugins/dotnet-data.
optimizing-ef-core-queries is a skill invoked when a query is already
slow (capture SQL, sargability, N+1, split queries). It is better and
deeper than this file on query performance. It is not standing
always-on applyTo **/*.cs instructions, and it does not pin the
async/HTTP-boundary rules (no sync-over-async, CancellationToken, no
entity bind/return). csharp.instructions.md in this repo also does not
pin those four items.
If the overlap is enough that this does not belong here, I will close.
If a narrower instructions file (async + HTTP boundary only, drop the
EF query section, and point at optimizing-ef-core-queries) would be
useful, I can do that instead.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds instructions/ef-core-async-safety.instructions.md for .NET 8+ ASP.NET Core. Generic csharp.instructions.md does not pin sync-over-async, N+1, AsNoTracking, or DTO projection. MIT. No paid product.