<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Agentic Architect</title>
    <description>The latest articles on DEV Community by Agentic Architect (@agentic_architect).</description>
    <link>https://dev.to/agentic_architect</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3943025%2Fd93dd98f-3af5-45cf-8a86-24170f172687.png</url>
      <title>DEV Community: Agentic Architect</title>
      <link>https://dev.to/agentic_architect</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/agentic_architect"/>
    <language>en</language>
    <item>
      <title>This week in Cursor + .NET — 6 rules (week ending June 28, 2026)</title>
      <dc:creator>Agentic Architect</dc:creator>
      <pubDate>Sun, 28 Jun 2026 11:58:43 +0000</pubDate>
      <link>https://dev.to/agentic_architect/this-week-in-cursor-net-6-rules-week-ending-june-28-2026-55f9</link>
      <guid>https://dev.to/agentic_architect/this-week-in-cursor-net-6-rules-week-ending-june-28-2026-55f9</guid>
      <description>&lt;p&gt;&lt;em&gt;Every weekday a single, opinionated rule for senior C#/.NET engineers using Cursor. Here's the full week in one read — canonical posts live on &lt;a href="https://agentic-architect.dev/blog/" rel="noopener noreferrer"&gt;the Agentic Architect blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6 daily senior rules
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Rule 21: Channels for Producer Consumer
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Sun 28 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;System.Threading.Channels beats BlockingCollection and beats roll-your-own queue plus SemaphoreSlim. The AI reaches for ConcurrentQueue every time and stitches it together by hand. A rule that detects producer/consumer patterns and proposes Channel will save you a class.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-28" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 20: Source-Generated JSON Serialisation
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Sat 27 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Reflection-based System.Text.Json is fine for prototypes. For hot paths and AOT, use JsonSerializable source generation. Cursor never thinks of this on its own — add a rule that flags new DTO classes and asks whether they should be source-generated.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-27" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 19: NetArchTest for Boundaries
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Fri 26 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Architectural rules belong in tests, not in code review. Encode them as NetArchTest assertions ("no class in Domain references EntityFrameworkCore") and they fail your build instead of your standup. Add the corresponding test whenever a new layer or project is introduced.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-26" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 18: WebApplicationFactory for Integration Tests
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Thu 25 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In-memory EF Core providers lie. Use WebApplicationFactory with Testcontainers (SQL Server, Postgres) for real integration coverage. Cursor defaults to UseInMemoryDatabase — it passes locally and ships the bug to production. Flag the in-memory provider in test projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-25" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 17: ConfigureAwait false in Libraries
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Wed 24 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Library code (non-ASP.NET) should ConfigureAwait false on every awaited Task. ASP.NET Core code should not. Cursor mixes the two contexts in the same solution. Detect the project type and enforce the right default.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-24" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 15: Records for Value Objects, Classes for Entities
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Mon 22 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Value objects (Money, Address, Coordinates) should be records. Entities with identity (Order, Customer) should be classes with an Id. Cursor mixes these constantly. A rule that classifies based on the presence or absence of an identity property keeps the distinction honest.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-22" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Try one rule before you trust the whole kit
&lt;/h2&gt;

&lt;p&gt;The free &lt;strong&gt;&lt;a href="https://github.com/agenticstandardcontact-byte/agentic-architect/blob/main/arch-core-lite.mdc?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=free_sample" rel="noopener noreferrer"&gt;&lt;code&gt;arch-core-lite.mdc&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt; is one drop-in Cursor rule that ends the morning re-explanation ritual. Install in 60 seconds, see whether Cursor actually remembers your DI lifetimes, and decide for yourself whether the full kit is worth £9.00.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free sample:&lt;/strong&gt; &lt;a href="https://github.com/agenticstandardcontact-byte/agentic-architect/blob/main/arch-core-lite.mdc?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=free_sample" rel="noopener noreferrer"&gt;&lt;code&gt;arch-core-lite.mdc&lt;/code&gt; on GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full kit (£9.00, one-time):&lt;/strong&gt; &lt;a href="https://payhip.com/b/98aSq?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=paid_kit" rel="noopener noreferrer"&gt;Agentic Architect Kit&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Daily rules feed:&lt;/strong&gt; &lt;a href="https://agentic-architect.dev/blog/?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=blog_index" rel="noopener noreferrer"&gt;https://agentic-architect.dev/blog/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Canonical home for everything in this digest: &lt;a href="https://agentic-architect.dev/blog/" rel="noopener noreferrer"&gt;https://agentic-architect.dev/blog/&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>ai</category>
      <category>cursor</category>
    </item>
    <item>
      <title>This week in Cursor + .NET — 7 rules (week ending June 21, 2026)</title>
      <dc:creator>Agentic Architect</dc:creator>
      <pubDate>Sun, 21 Jun 2026 12:21:23 +0000</pubDate>
      <link>https://dev.to/agentic_architect/this-week-in-cursor-net-7-rules-week-ending-june-21-2026-2n6k</link>
      <guid>https://dev.to/agentic_architect/this-week-in-cursor-net-7-rules-week-ending-june-21-2026-2n6k</guid>
      <description>&lt;p&gt;&lt;em&gt;Every weekday a single, opinionated rule for senior C#/.NET engineers using Cursor. Here's the full week in one read — canonical posts live on &lt;a href="https://agentic-architect.dev/blog/" rel="noopener noreferrer"&gt;the Agentic Architect blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7 daily senior rules
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Rule 14: Sealed By Default
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Sun 21 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Mark every class sealed unless inheritance is explicitly planned. Stops Cursor inventing accidental inheritance hierarchies "for flexibility." Small but measurable virtual-call perf wins too.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-21" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 13: Strongly-Typed IDs
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Sat 20 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;OrderId as record struct OrderId(Guid Value) beats raw Guid everywhere. Stops the AI passing a CustomerId where an OrderId was expected — a bug the compiler can't catch with primitive obsession but catches instantly with domain primitives.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-20" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 12: IOptionsSnapshot Over Raw Config
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Fri 19 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Business code should never call IConfiguration directly. Strongly-typed IOptions or IOptionsSnapshot bindings only. The AI loves to "just grab the config value" — refuse it and force a settings class with validation attributes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-19" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 11: Rethrow, Don't throw ex
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Thu 18 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;throw ex resets the stack trace. throw preserves it. Cursor gets this wrong about 40 percent of the time when generating catch blocks. Rewrite any naked throw ex to throw unless the exception has been explicitly wrapped.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-18" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 10: AsNoTracking for Reads
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Wed 17 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every read-only EF Core query should call AsNoTracking. Add a rule that recognises query methods returning DTOs (not entities) and inserts the call. Cursor never does this by default and your read perf degrades silently across releases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-17" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 9: Scoped Capture in Singleton
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Tue 16 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The single most expensive .NET runtime bug: a Singleton holding a Scoped service. Cursor cheerfully writes this without warning. Audit constructor parameters of any class registered as Singleton — if any are typically Scoped (DbContext, repositories, MediatR sender), flag it before merge.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-16" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 8: CancellationToken Propagation
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Mon 15 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every async method in your codebase should accept and forward a CancellationToken. Make it a rule that any new async signature without one is flagged. Stops the AI from quietly losing cancellation half-way down a call chain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-15" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Try one rule before you trust the whole kit
&lt;/h2&gt;

&lt;p&gt;The free &lt;strong&gt;&lt;a href="https://github.com/agenticstandardcontact-byte/agentic-architect/blob/main/arch-core-lite.mdc?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=free_sample" rel="noopener noreferrer"&gt;&lt;code&gt;arch-core-lite.mdc&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt; is one drop-in Cursor rule that ends the morning re-explanation ritual. Install in 60 seconds, see whether Cursor actually remembers your DI lifetimes, and decide for yourself whether the full kit is worth £9.00.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free sample:&lt;/strong&gt; &lt;a href="https://github.com/agenticstandardcontact-byte/agentic-architect/blob/main/arch-core-lite.mdc?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=free_sample" rel="noopener noreferrer"&gt;&lt;code&gt;arch-core-lite.mdc&lt;/code&gt; on GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full kit (£9.00, one-time):&lt;/strong&gt; &lt;a href="https://payhip.com/b/98aSq?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=paid_kit" rel="noopener noreferrer"&gt;Agentic Architect Kit&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Daily rules feed:&lt;/strong&gt; &lt;a href="https://agentic-architect.dev/blog/?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=blog_index" rel="noopener noreferrer"&gt;https://agentic-architect.dev/blog/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Canonical home for everything in this digest: &lt;a href="https://agentic-architect.dev/blog/" rel="noopener noreferrer"&gt;https://agentic-architect.dev/blog/&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>ai</category>
      <category>cursor</category>
    </item>
    <item>
      <title>This week in Cursor + .NET — 7 rules (week ending June 14, 2026)</title>
      <dc:creator>Agentic Architect</dc:creator>
      <pubDate>Sun, 14 Jun 2026 12:15:51 +0000</pubDate>
      <link>https://dev.to/agentic_architect/this-week-in-cursor-net-7-rules-week-ending-june-14-2026-3lg5</link>
      <guid>https://dev.to/agentic_architect/this-week-in-cursor-net-7-rules-week-ending-june-14-2026-3lg5</guid>
      <description>&lt;p&gt;&lt;em&gt;Every weekday a single, opinionated rule for senior C#/.NET engineers using Cursor. Here's the full week in one read — canonical posts live on &lt;a href="https://agentic-architect.dev/blog/" rel="noopener noreferrer"&gt;the Agentic Architect blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7 daily senior rules
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Rule 7: IHttpClientFactory Discipline
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Sun 14 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Refuse new HttpClient() in any generated code. Force Cursor to inject IHttpClientFactory or a typed client. The classic socket-exhaustion bug is exactly the kind of footgun an AI hands you without realising.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-14" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 6: TimeProvider Injection
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Sat 13 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Never let Cursor hardcode DateTime.Now or DateTime.UtcNow in business logic. Inject TimeProvider (or your own IClock) instead. This makes time deterministic for tests and stops the AI reaching for static APIs whenever it generates time-aware code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-13" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 5: Minimal API Groups
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Fri 12 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Use MapGroup and EndPoints for .NET 9 services. It keeps the context window lean and focused, helping the AI provide more accurate code suggestions than it can with massive, bloated Controllers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-12" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 4: Validator Enforcement
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Thu 11 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every MediatR Request must have a FluentValidation rule. Force the AI to check the validator before writing handler logic. This prevents "context rot" where the AI forgets your business constraints.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-11" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 3: Structured Logging
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Wed 10 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Enforce ILogger with structured templates. Never use string interpolation in logs. This ensures that when you feed logs back into Cursor for debugging, the AI recognizes the patterns immediately.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-10" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 2: Persistence Boundaries
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Tue 09 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Never let the AI write database logic in your Controllers. Enforce a strict boundary where all IQueryable access stays in the Infrastructure layer. This keeps your business logic "pure" and readable for the LLM.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-09" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 1: The Result Pattern
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Mon 08 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Stop using nulls for flow control. Use a Result object to force Cursor to handle success and failure cases explicitly. This prevents 90% of AI-generated logic errors in Web APIs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-08" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Try one rule before you trust the whole kit
&lt;/h2&gt;

&lt;p&gt;The free &lt;strong&gt;&lt;a href="https://github.com/agenticstandardcontact-byte/agentic-architect/blob/main/arch-core-lite.mdc?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=free_sample" rel="noopener noreferrer"&gt;&lt;code&gt;arch-core-lite.mdc&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt; is one drop-in Cursor rule that ends the morning re-explanation ritual. Install in 60 seconds, see whether Cursor actually remembers your DI lifetimes, and decide for yourself whether the full kit is worth £9.00.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free sample:&lt;/strong&gt; &lt;a href="https://github.com/agenticstandardcontact-byte/agentic-architect/blob/main/arch-core-lite.mdc?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=free_sample" rel="noopener noreferrer"&gt;&lt;code&gt;arch-core-lite.mdc&lt;/code&gt; on GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full kit (£9.00, one-time):&lt;/strong&gt; &lt;a href="https://payhip.com/b/98aSq?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=paid_kit" rel="noopener noreferrer"&gt;Agentic Architect Kit&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Daily rules feed:&lt;/strong&gt; &lt;a href="https://agentic-architect.dev/blog/?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=blog_index" rel="noopener noreferrer"&gt;https://agentic-architect.dev/blog/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Canonical home for everything in this digest: &lt;a href="https://agentic-architect.dev/blog/" rel="noopener noreferrer"&gt;https://agentic-architect.dev/blog/&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>ai</category>
      <category>cursor</category>
    </item>
    <item>
      <title>The AI-generated C# that passes review and breaks in production</title>
      <dc:creator>Agentic Architect</dc:creator>
      <pubDate>Tue, 09 Jun 2026 21:34:17 +0000</pubDate>
      <link>https://dev.to/agentic_architect/the-ai-generated-c-that-passes-review-and-breaks-in-production-5ci3</link>
      <guid>https://dev.to/agentic_architect/the-ai-generated-c-that-passes-review-and-breaks-in-production-5ci3</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; — AI assistants are producing C# that &lt;em&gt;looks&lt;/em&gt; correct and passes review, but reintroduces production regressions we spent years training out of teams. I'm trying to find out whether other .NET teams see the same patterns — and what's actually catching them before merge.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;More AI-generated C# is landing in pull requests. Most of it is fine.&lt;/p&gt;

&lt;p&gt;But a &lt;strong&gt;specific category keeps slipping through&lt;/strong&gt; — and it's the dangerous one, because it compiles, tests pass, and a human skim says "looks good."&lt;/p&gt;




&lt;h2&gt;
  
  
  The pattern
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;The code compiles. Tests pass. Review approves. Production finds out.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;These aren't syntax errors. They're &lt;strong&gt;architectural intent&lt;/strong&gt; violations — the kind of thing a senior dev would have caught in review &lt;em&gt;before&lt;/em&gt; PR volume tripled.&lt;/p&gt;




&lt;h2&gt;
  
  
  Five regressions I keep seeing
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. EF Core read paths without &lt;code&gt;AsNoTracking()&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Fine in dev. Expensive on a hot read path in prod.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ❌ Looks reasonable. Tracks entities you never mutate.&lt;/span&gt;
&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;_db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Orders&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CustomerId&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ToListAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cancellationToken&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Fix direction:&lt;/strong&gt; &lt;code&gt;AsNoTracking()&lt;/code&gt; on read-only queries, or a team convention documented in &lt;code&gt;CLAUDE.md&lt;/code&gt; / Copilot instructions.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Captive dependency (scoped service in a singleton)
&lt;/h3&gt;

&lt;p&gt;Compiles. Runs. Wrong state across requests.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ❌ Singleton lives forever; scoped dependency does not.&lt;/span&gt;
&lt;span class="n"&gt;services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddScoped&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IOrderRepository&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;OrderRepository&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;
&lt;span class="n"&gt;services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddSingleton&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ReportCache&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt; &lt;span class="c1"&gt;// ctor takes IOrderRepository&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Fix direction:&lt;/strong&gt; align lifetimes, or inject &lt;code&gt;IServiceScopeFactory&lt;/code&gt; instead of capturing scoped services.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Dropped &lt;code&gt;CancellationToken&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The method accepts cancellation. The downstream call ignores it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ❌ Signature honours cancellation; body doesn't.&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt; &lt;span class="nf"&gt;RunAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;CancellationToken&lt;/span&gt; &lt;span class="n"&gt;cancellationToken&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Delay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;500&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// overload with token exists&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Fix direction:&lt;/strong&gt; forward &lt;code&gt;cancellationToken&lt;/code&gt; to every downstream async call that accepts one.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Swallowed exception
&lt;/h3&gt;

&lt;p&gt;Failure disappears. Monitoring stays green.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ❌ "Handle errors gracefully" — AI edition.&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;SaveAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cancellationToken&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// ignore&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Fix direction:&lt;/strong&gt; log and rethrow, or handle a &lt;em&gt;specific&lt;/em&gt; exception type with real recovery logic.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. &lt;code&gt;Task.Run&lt;/code&gt; over blocking I/O
&lt;/h3&gt;

&lt;p&gt;Looks async. Still blocks a thread pool thread.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ❌ Offloads the blocking call; doesn't remove it.&lt;/span&gt;
&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ReadAllText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Fix direction:&lt;/strong&gt; &lt;code&gt;ReadAllTextAsync&lt;/code&gt;, &lt;code&gt;OpenReadAsync&lt;/code&gt;, or other truly async I/O APIs.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why review misses them
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What reviewers see&lt;/th&gt;
&lt;th&gt;What production sees&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Clean diff, idiomatic C#&lt;/td&gt;
&lt;td&gt;Tracking overhead, stale scoped state, ignored cancellation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Green CI&lt;/td&gt;
&lt;td&gt;Incidents that are hard to trace back to a specific PR&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"We have analyzers"&lt;/td&gt;
&lt;td&gt;Warnings buried in the IDE or not enforced on merge&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The assistant doesn't carry your team's hard-won context — lifetime rules, EF conventions, "we always forward the token" — and reviewers are &lt;strong&gt;skimming more PRs than before&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why IDE warnings aren't enough (maybe)
&lt;/h2&gt;

&lt;p&gt;Roslynator, Sonar, and the built-in analyzers catch a lot of generic quality issues. That part is in decent shape.&lt;/p&gt;

&lt;p&gt;The gap I keep feeling is less about &lt;strong&gt;detecting&lt;/strong&gt; these while someone is typing — where warnings get ignored — and more about &lt;strong&gt;enforcing&lt;/strong&gt; them &lt;strong&gt;in CI, on the PR&lt;/strong&gt;, so they can't merge.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I'm not convinced the missing piece is "another rule in the IDE." I think it's "this can't ship unless it's fixed."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Two questions for you
&lt;/h2&gt;

&lt;p&gt;I'm genuinely trying to compare notes — &lt;strong&gt;not selling anything.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Are you seeing these AI-introduced regressions slip past review?&lt;/strong&gt; Which ones — if any — show up most on your team?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If you've tightened things up — how?&lt;/strong&gt; Custom analyzers? Stricter CI? &lt;code&gt;.editorconfig&lt;/code&gt; severity as errors? Team-specific rules checked automatically? Or still mostly discipline and careful review?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Drop a comment with what's working (or what's failing) on your team. Especially interested in hearing from &lt;strong&gt;tech leads and EMs&lt;/strong&gt; running small-to-mid .NET teams with a steady flow of AI-assisted PRs.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;No product pitch — mapping whether this is a real, recurring team problem or just my bubble. Thanks for reading.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>csharp</category>
      <category>ai</category>
      <category>codereview</category>
    </item>
    <item>
      <title>This week in Cursor + .NET — 7 rules + 1 essay (week ending June 07, 2026)</title>
      <dc:creator>Agentic Architect</dc:creator>
      <pubDate>Sun, 07 Jun 2026 20:27:34 +0000</pubDate>
      <link>https://dev.to/agentic_architect/this-week-in-cursor-net-6-rules-1-essay-week-ending-june-07-2026-2j88</link>
      <guid>https://dev.to/agentic_architect/this-week-in-cursor-net-6-rules-1-essay-week-ending-june-07-2026-2j88</guid>
      <description>&lt;p&gt;&lt;em&gt;Every weekday a single, opinionated rule for senior C#/.NET engineers using Cursor. Here's the full week in one read — canonical posts live on &lt;a href="https://agentic-architect.dev/blog/" rel="noopener noreferrer"&gt;the Agentic Architect blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  New essays this week
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://agentic-architect.dev/blog/08-cursor-vs-copilot-dotnet.html" rel="noopener noreferrer"&gt;Cursor vs GitHub Copilot for C#/.NET in 2026: which to pay for&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Tue 02 Jun · .NET tooling&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Real pricing, where each one wins on agentic .NET edits, where each one loses, and a straight verdict on which to pay for.&lt;/p&gt;

&lt;h2&gt;
  
  
  7 daily senior rules
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Rule 25: ActivitySource for OpenTelemetry
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Sun 07 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Logs alone won't debug a distributed system. Add a static readonly ActivitySource per project and wrap every external call (DB, HTTP, queue) in StartActivity. Cursor never adds OTEL spans on its own — give it a rule that recognises external-call patterns and proposes the trace.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-07" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 24: ValueTask Only When Justified
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Sat 06 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;ValueTask is a perf optimisation for hot paths that often return synchronously. It is not a drop-in for Task. Cursor swaps them around without thinking. Flag ValueTask returns and ask whether the method is actually mostly synchronous. If not, revert to Task.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-06" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 23: No Bool Flag Parameters
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Fri 05 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;SendEmail(string to, bool isHtml) should be SendHtmlEmail and SendPlainEmail. Bool flags hide branching that belongs in the type system. Flag any method signature with two or more bool parameters as a refactor candidate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-05" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 22: BackgroundService Over Task.Run
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Thu 04 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Long-running work in ASP.NET Core goes in a BackgroundService, not Task.Run inside a controller. Cursor will happily fire Task.Run and call it "async work" — your request thread will die mid-execution and you'll never know why. Catch Task.Run outside test code and propose a hosted service.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-04" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 21: Channels for Producer Consumer
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Wed 03 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;System.Threading.Channels beats BlockingCollection and beats roll-your-own queue plus SemaphoreSlim. The AI reaches for ConcurrentQueue every time and stitches it together by hand. A rule that detects producer/consumer patterns and proposes Channel will save you a class.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-03" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 20: Source-Generated JSON Serialisation
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Tue 02 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Reflection-based System.Text.Json is fine for prototypes. For hot paths and AOT, use JsonSerializable source generation. Cursor never thinks of this on its own — add a rule that flags new DTO classes and asks whether they should be source-generated.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-02" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 19: NetArchTest for Boundaries
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Mon 01 Jun&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Architectural rules belong in tests, not in code review. Encode them as NetArchTest assertions ("no class in Domain references EntityFrameworkCore") and they fail your build instead of your standup. Add the corresponding test whenever a new layer or project is introduced.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/#2026-06-01" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Try one rule before you trust the whole kit
&lt;/h2&gt;

&lt;p&gt;The free &lt;strong&gt;&lt;a href="https://github.com/agenticstandardcontact-byte/agentic-architect/blob/main/arch-core-lite.mdc?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=free_sample" rel="noopener noreferrer"&gt;&lt;code&gt;arch-core-lite.mdc&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt; is one drop-in Cursor rule that ends the morning re-explanation ritual. Install in 60 seconds, see whether Cursor actually remembers your DI lifetimes, and decide for yourself whether the full kit is worth £9.00.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free sample:&lt;/strong&gt; &lt;a href="https://github.com/agenticstandardcontact-byte/agentic-architect/blob/main/arch-core-lite.mdc?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=free_sample" rel="noopener noreferrer"&gt;&lt;code&gt;arch-core-lite.mdc&lt;/code&gt; on GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full kit (£9.00, one-time):&lt;/strong&gt; &lt;a href="https://payhip.com/b/98aSq?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=paid_kit" rel="noopener noreferrer"&gt;Agentic Architect Kit&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Daily rules feed:&lt;/strong&gt; &lt;a href="https://agentic-architect.dev/blog/?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=blog_index" rel="noopener noreferrer"&gt;https://agentic-architect.dev/blog/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Canonical home for everything in this digest: &lt;a href="https://agentic-architect.dev/blog/" rel="noopener noreferrer"&gt;https://agentic-architect.dev/blog/&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>ai</category>
      <category>cursor</category>
    </item>
    <item>
      <title>Cursor vs GitHub Copilot for C#/.NET in 2026: which to pay for</title>
      <dc:creator>Agentic Architect</dc:creator>
      <pubDate>Tue, 02 Jun 2026 22:48:38 +0000</pubDate>
      <link>https://dev.to/agentic_architect/cursor-vs-github-copilot-for-cnet-in-2026-which-to-pay-for-l3m</link>
      <guid>https://dev.to/agentic_architect/cursor-vs-github-copilot-for-cnet-in-2026-which-to-pay-for-l3m</guid>
      <description>&lt;p&gt;**Cursor vs GitHub Copilot for C#/.NET in 2026: which to pay for&lt;/p&gt;

&lt;p&gt;If you write C#/.NET for a living, the AI tool question in 2026 is rarely Cursor or nothing. It's whether Cursor earns its seat next to the GitHub Copilot licence your org probably already pays for. This is the honest comparison: what each one actually costs, where each one wins on real .NET work, and where each one quietly falls down.&lt;/p&gt;

&lt;p&gt;The decision you're actually making&lt;/p&gt;

&lt;p&gt;Most teams don't pick between these two from a blank slate. Copilot is usually already there, bundled into the org's GitHub plan. So the real question is narrower and more useful: does Cursor do enough that Copilot can't, on a production .NET codebase, to justify a second subscription? The answer turns on agentic edits, not autocomplete.&lt;/p&gt;

&lt;p&gt;The pricing, in 2026 GBP&lt;/p&gt;

&lt;p&gt;These figures are stamped to 2 June 2026. The vendors quote in USD, so the GBP numbers are converted at about $1 = £0.79 (June 2026) and rounded. Check the live rate and the vendor page before you publish, because Copilot moved to usage-based billing on 1 June 2026 and Cursor now runs on a monthly credit pool.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool / plan&lt;/th&gt;
&lt;th&gt;Price&lt;/th&gt;
&lt;th&gt;What you actually get&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cursor Pro&lt;/td&gt;
&lt;td&gt;approx £16/mo ($20; £12.60/mo billed annually)&lt;/td&gt;
&lt;td&gt;$20 of included API usage, unlimited Tab completions, unlimited Auto mode. Monthly credit pool with overage.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cursor Ultra (top tier)&lt;/td&gt;
&lt;td&gt;approx £158/mo ($200; £126/mo annually)&lt;/td&gt;
&lt;td&gt;$400 of included API usage and roughly 20x the Pro agent limits. Same frontier model access as Pro.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GitHub Copilot Pro&lt;/td&gt;
&lt;td&gt;approx £8/mo ($10)&lt;/td&gt;
&lt;td&gt;Code completions and Next Edit Suggestions stay unlimited and free. 1,500 monthly AI credits (1,000 base + 500 flex) cover agent mode, chat, CLI and PR review.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GitHub Copilot Pro+&lt;/td&gt;
&lt;td&gt;approx £31/mo ($39)&lt;/td&gt;
&lt;td&gt;7,000 monthly AI credits (3,900 base + 3,100 flex) and wider model choice. Completions are still free and unlimited.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GitHub Copilot Business&lt;/td&gt;
&lt;td&gt;approx £15/user/mo ($19)&lt;/td&gt;
&lt;td&gt;Org policy controls, audit and seat management pooled across the org, plus IP indemnity on the business plan.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Set against a senior .NET rate of about £60 to £120 an hour, both tools are rounding errors. The cost that matters is the time each one saves or wastes, not the monthly fee.&lt;/p&gt;

&lt;p&gt;Where Copilot wins&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;****It's already paid for. If your org has GitHub Enterprise, Copilot is often a checkbox, not a new purchase or a new approval.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;****Visual Studio integration. For teams living in full Visual Studio (not VS Code), Copilot sits natively in the IDE you already debug and profile in.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;****Org governance. The Business and Enterprise tiers ship policy controls and seat management pooled across the org, with IP indemnity on the paid org plans.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;****Inline completion quality. Ghost-text completions are unlimited and free on every Copilot tier, and they stay sharp on idiomatic C#. There's no clean acceptance-rate figure here, so take this as hands-on experience rather than a benchmark.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Where Cursor wins&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;****Multi-file agentic edits. "Add a CancellationToken to every async method in the Application layer and propagate it" is one prompt across dozens of files. This is the gap that justifies the second seat.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;****Composer and background agents. Longer tasks ("port this controller to Minimal API, write the xUnit tests, run them") iterate without hand-holding. Copilot has its own agent mode now, billed against AI credits since 1 June 2026, and it is closing the gap, so re-check parity by the time you read this.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;``&lt;/strong&gt;Directory-scoped .mdc rules + MCP. You can pin your house style (Result over throw, AsNoTracking on reads) and wire local tools through MCP. Cursor's per-directory rule scoping is the edge here for layered architectures.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;****Semantic codebase search. "Find where we authorise admin-only endpoints" lands the right file without naming the symbol first.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Where each one breaks first&lt;/p&gt;

&lt;p&gt;The trust-earning part. Neither tool is magic, and both regress your architecture if you let them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;****Cursor drifts from your conventions the moment your rules are thin. Without scoped rules and a Learning Log it writes the public-internet average of a .NET codebase: exceptions for business failures, EF Core in the domain layer, DbContext captured by singletons.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;****Copilot is strongest at the line and weakest at the cascade. Its agent mode will attempt multi-file work, but it rarely lands a coherent cross-layer refactor in one shot. Worth re-testing as agent mode matures.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;****``Both happily generate an N+1 query or a missing AsNoTracking() unless something stops them. That something is rules, not the model.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For this job, reach for this&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Reach for&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Inline completion while typing in Visual Studio&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Copilot&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Native IDE integration, already licensed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Add the same field + constructor + DI registration across 12 services&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Cursor&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Agentic cascade in one prompt; Copilot edits line by line&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Port a controller to Minimal API + tests + run them&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Cursor&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Iterate-until-tests-pass is Cursor's home turf&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Org-wide policy, audit, IP indemnity&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Copilot Business&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Org policy controls and indemnity on the business plan&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pin house style so the AI stops regressing it&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Cursor&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Directory-scoped &lt;code&gt;.mdc&lt;/code&gt; rules + Learning Log&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The honest verdict&lt;/p&gt;

&lt;p&gt;If you bill at senior rates and you do real refactors, pay for Cursor even when Copilot is already on the org card. The agentic edit gap is the whole argument, and one saved afternoon covers a year of the subscription. If you live in full Visual Studio, rarely leave inline completion, and your org won't approve a second tool, Copilot alone is a defensible call. The one setup that loses is running either of them ungoverned.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;br&gt;
Whichever tool you pay for, the expensive failure mode is the same: ungoverned agentic edits. The Agentic Architect kit is the scoped rule set and Learning Log that keeps Cursor or Copilot aligned with your layers, DI lifetimes, and read patterns instead of the public-internet average.&lt;/p&gt;

&lt;p&gt;Related comparisons&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/05-cursor-vs-rider-dotnet.html" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;br&gt;
If you're weighing the IDE side of this too, see Cursor vs JetBrains Rider for C#/.NET. More tool, hardware, and model comparisons land here weekly.&lt;/p&gt;

&lt;p&gt;Keep reading&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/05-cursor-vs-rider-dotnet.html" rel="noopener noreferrer"&gt;&lt;/a&gt;Cursor vs Rider&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/07-cursor-efcore-patterns.html" rel="noopener noreferrer"&gt;&lt;/a&gt;EF Core patterns&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://agentic-architect.dev/hardware/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;br&gt;
Kit: Agentic Architect · Local models: Hardware hub&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Free starter (3 Cursor rules):&lt;/strong&gt; &lt;a href="https://agentic-architect.dev/#free-kit-signup" rel="noopener noreferrer"&gt;https://agentic-architect.dev/#free-kit-signup&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full kit (£9, one-time):&lt;/strong&gt; &lt;a href="https://payhip.com/b/98aSq?utm_source=devto&amp;amp;utm_medium=08-cursor-vs-copilot-dotnet&amp;amp;utm_campaign=paid_kit" rel="noopener noreferrer"&gt;Get Agentic Architect&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://agentic-architect.dev/blog/08-cursor-vs-copilot-dotnet.html" rel="noopener noreferrer"&gt;https://agentic-architect.dev/blog/08-cursor-vs-copilot-dotnet.html&lt;/a&gt;. Part of the &lt;a href="https://agentic-architect.dev/" rel="noopener noreferrer"&gt;Agentic Architect&lt;/a&gt; persistence kit for Cursor + .NET.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>ai</category>
      <category>cursor</category>
    </item>
    <item>
      <title>This week in Cursor + .NET — 6 rules + 3 essays (week ending May 31, 2026)</title>
      <dc:creator>Agentic Architect</dc:creator>
      <pubDate>Sun, 31 May 2026 11:51:26 +0000</pubDate>
      <link>https://dev.to/agentic_architect/this-week-in-cursor-net-6-rules-3-essays-week-ending-may-31-2026-3354</link>
      <guid>https://dev.to/agentic_architect/this-week-in-cursor-net-6-rules-3-essays-week-ending-may-31-2026-3354</guid>
      <description>&lt;p&gt;&lt;em&gt;Every weekday a single, opinionated rule for senior C#/.NET engineers using Cursor. Here's the full week in one read — canonical posts live on &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/" rel="noopener noreferrer"&gt;the Agentic Architect blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  New essays this week
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/06-stop-cursor-ai-drift-dotnet.html" rel="noopener noreferrer"&gt;How to stop Cursor AI forgetting your .NET architecture (the $9 fix)&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Sat 30 May · .NET tooling&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Cursor forgets your DI patterns, boundaries, and conventions every session. Here's a 4-rule framework that locks your architecture into the AI's long-term memory.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/07-cursor-efcore-patterns.html" rel="noopener noreferrer"&gt;How to use Cursor AI with Entity Framework Core (without blowing up your database)&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Sat 30 May · .NET tooling&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Cursor AI generates N+1 queries, eager-loads entire databases, and skips AsNoTracking. Here's a rule-based guardrail system that catches 90% of EF Core mistakes before production.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/05-cursor-vs-rider-dotnet.html" rel="noopener noreferrer"&gt;Cursor vs JetBrains Rider for C#/.NET in 2026: which to pay for&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Tue 26 May · .NET tooling&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Senior .NET teams aren't picking - they're paying for both. The honest comparison, the pricing math, and the config that lets the two tools share state.&lt;/p&gt;

&lt;h2&gt;
  
  
  6 daily senior rules
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Rule 18: WebApplicationFactory for Integration Tests
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Sun 31 May&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In-memory EF Core providers lie. Use WebApplicationFactory with Testcontainers (SQL Server, Postgres) for real integration coverage. Cursor defaults to UseInMemoryDatabase — it passes locally and ships the bug to production. Flag the in-memory provider in test projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/#2026-05-31" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 17: ConfigureAwait false in Libraries
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Sat 30 May&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Library code (non-ASP.NET) should ConfigureAwait false on every awaited Task. ASP.NET Core code should not. Cursor mixes the two contexts in the same solution. Detect the project type and enforce the right default.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/#2026-05-30" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 16: async void Outside Event Handlers
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Fri 29 May&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;async void is a deadlock and unhandled-exception trap everywhere except UI event handlers. The AI uses it routinely for "fire and forget" — wrong answer every time. Flag it on sight.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/#2026-05-29" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 15: Records for Value Objects, Classes for Entities
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Thu 28 May&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Value objects (Money, Address, Coordinates) should be records. Entities with identity (Order, Customer) should be classes with an Id. Cursor mixes these constantly. A rule that classifies based on the presence or absence of an identity property keeps the distinction honest.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/#2026-05-28" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 14: Sealed By Default
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Wed 27 May&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Mark every class sealed unless inheritance is explicitly planned. Stops Cursor inventing accidental inheritance hierarchies "for flexibility." Small but measurable virtual-call perf wins too.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/#2026-05-27" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 12: IOptionsSnapshot Over Raw Config
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Mon 25 May&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Business code should never call IConfiguration directly. Strongly-typed IOptions or IOptionsSnapshot bindings only. The AI loves to "just grab the config value" — refuse it and force a settings class with validation attributes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/#2026-05-25" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Try one rule before you trust the whole kit
&lt;/h2&gt;

&lt;p&gt;The free &lt;strong&gt;&lt;a href="https://github.com/agenticstandardcontact-byte/agentic-architect/blob/main/arch-core-lite.mdc?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=free_sample" rel="noopener noreferrer"&gt;&lt;code&gt;arch-core-lite.mdc&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt; is one drop-in Cursor rule that ends the morning re-explanation ritual. Install in 60 seconds, see whether Cursor actually remembers your DI lifetimes, and decide for yourself whether the full kit is worth £19.99.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free sample:&lt;/strong&gt; &lt;a href="https://github.com/agenticstandardcontact-byte/agentic-architect/blob/main/arch-core-lite.mdc?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=free_sample" rel="noopener noreferrer"&gt;&lt;code&gt;arch-core-lite.mdc&lt;/code&gt; on GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full kit (£19.99, one-time):&lt;/strong&gt; &lt;a href="https://agenticarchitect.gumroad.com/l/dotnet-persistence-kit?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=paid_kit" rel="noopener noreferrer"&gt;Agentic Architect on Gumroad&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Daily rules feed:&lt;/strong&gt; &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=blog_index" rel="noopener noreferrer"&gt;https://agenticstandardcontact-byte.github.io/agentic-architect/blog/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Canonical home for everything in this digest: &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/" rel="noopener noreferrer"&gt;https://agenticstandardcontact-byte.github.io/agentic-architect/blog/&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>ai</category>
      <category>cursor</category>
    </item>
    <item>
      <title>How to use Cursor AI with Entity Framework Core (without blowing up your database)</title>
      <dc:creator>Agentic Architect</dc:creator>
      <pubDate>Sat, 30 May 2026 14:26:41 +0000</pubDate>
      <link>https://dev.to/agentic_architect/how-to-use-cursor-ai-with-entity-framework-core-without-blowing-up-your-database-36a9</link>
      <guid>https://dev.to/agentic_architect/how-to-use-cursor-ai-with-entity-framework-core-without-blowing-up-your-database-36a9</guid>
      <description>&lt;p&gt;****How to use Cursor AI with Entity Framework Core (without blowing up your database)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You ask Cursor to add a simple API endpoint. It generates a working controller. You glance at the EF Core code. .Include().ThenInclude().ThenInclude() — three levels deep, no AsNoTracking(), and a ToListAsync() that materialises 50,000 rows. Congratulations: your AI assistant just authored a production incident. Here's how to stop it — permanently, automatically, before the code hits your PR.


## 
The silent database killer in your AI pair programmer


**
Cursor AI is genuinely excellent at generating .NET code. It understands your domain models, your repository patterns, your controller structure. But there's one area where it consistently fails — and fails dangerously — and that's Entity Framework Core.


****``````


The reason is simple: Cursor's training data contains millions of EF Core examples from blog posts, Stack Overflow answers, and GitHub repos. Most of those examples are simplified for readability, not production-grade. They omit AsNoTracking() for brevity. They eager-load entire object graphs because the author wanted to show .Include() syntax. They call .ToList() before filtering because the example was 10 rows.


The AI faithfully reproduces these patterns. And your production database pays the price.

## 
The 4 EF Core patterns Cursor gets wrong — every time


After auditing ~200 AI-generated EF Core code blocks across a production .NET solution, four failure patterns appeared with alarming consistency. Here they are, ranked by production impact:

### 
1. Missing AsNoTracking on read-only queries


The most common and most expensive mistake. Cursor generates read endpoints that materialise entities into the change tracker — even though the result is serialised to JSON and never updated. Every single query builds a snapshot of every returned entity in memory. On a list endpoint returning 500 rows with 10 navigation properties each, that's thousands of tracked instances for data that will never change.




```

```

csharp
// ❌ Cursor-generated: tracks every entity in memory
var products = await _context.Products
    .Include(p =&amp;gt; p.Category)
    .Include(p =&amp;gt; p.Supplier)
    .ToListAsync();

// ✅ Production: read-only query, zero change tracker overhead
var products = await _context.Products
    .AsNoTracking()
    .Include(p =&amp;gt; p.Category)
    .Include(p =&amp;gt; p.Supplier)
    .ToListAsync();

### 
2. Unbounded eager loading chains


``
Cursor loves .Include().ThenInclude(). Give it a model with navigation properties and it will eagerly load the entire object graph — often 4-5 levels deep. What should be a 2-join query becomes a Cartesian explosion that brings back megabytes of redundant data.


```

```csharp
// ❌ Cursor-generated: eager-loads the entire database
var orders = await _context.Orders
    .Include(o =&amp;gt; o.Customer)
        .ThenInclude(c =&amp;gt; c.Address)
    .Include(o =&amp;gt; o.LineItems)
        .ThenInclude(li =&amp;gt; li.Product)
            .ThenInclude(p =&amp;gt; p.Supplier)
    .ToListAsync();

// ✅ Production: projection to exactly what the client needs
var orders = await _context.Orders
    .Select(o =&amp;gt; new OrderDto
    {
        Id = o.Id,
        CustomerName = o.Customer.Name,
        Total = o.LineItems.Sum(li =&amp;gt; li.Price * li.Quantity)
    })
    .AsNoTracking()
    .ToListAsync();

### 
3. N+1 queries disguised as clean code


``
The insidious one. Cursor writes a clean-looking loop that iterates over entities and accesses navigation properties. It looks fine — no .Include() problems here. But every property access triggers a lazy-load round-trip to the database. 100 entities = 101 queries.




```

```

csharp
// ❌ Cursor-generated: looks clean, generates N+1 queries
var blogs = await _context.Blogs.ToListAsync();
foreach (var blog in blogs)
{
    Console.WriteLine($"{blog.Name}: {blog.Posts.Count} posts");
    // Each .Posts access = 1 database round-trip 💀
}

// ✅ Production: single query with projection
var blogStats = await _context.Blogs
    .Select(b =&amp;gt; new { b.Name, PostCount = b.Posts.Count })
    .AsNoTracking()
    .ToListAsync();

### 
4. Client-side evaluation after Where


****
Cursor sometimes writes LINQ expressions that EF Core can't translate to SQL. Instead of throwing, EF Core silently switches to client-side evaluation — pulling all rows into memory and filtering in C#. The query works. The database dies.




```

```


// ❌ Cursor-generated: custom method triggers client eval
var active = await _context.Users
    .Where(u =&amp;gt; IsActiveUser(u))  // EF Core can't translate this
    .ToListAsync();
    // → Pulls ALL users into memory, then filters in C#

// ✅ Production: translatable expression
var active = await _context.Users
    .Where(u =&amp;gt; u.LastLoginDate &amp;gt;= DateTime.UtcNow.AddDays(-30))
    .AsNoTracking()
    .ToListAsync();

## 
The fix: a rule-based guardrail that catches these before PR


****``
You could manually review every AI-generated EF Core line. Or you could install a set of Cursor rules that prevent the AI from generating these patterns in the first place. The Agentic Architect kit includes an ef-core-reads.mdc rule specifically designed to stop these four failures:


- ****````AsNoTracking by default: the rule mandates .AsNoTracking() on every query that doesn't call .SaveChanges[Async](). Cursor learns this as a baseline.

- ****````Include depth limit: maximum 2-level .Include() chain enforced. Anything deeper must use .Select() projections — which are more efficient anyway.

- ****``No lazy loading in loops: the rule marks any foreach over entity results as a violation template. Cursor auto-suggests projection instead.

- ****``EF Core 9 configure warnings: the rule includes a DbContext configuration snippet that throws on client-side evaluation, making the failure visible at dev time, not production.


## 
How the rule works inside Cursor


``****

````
The ef-core-reads.mdc rule is directory-scoped. It activates only when Cursor's agent is working inside your data-access project — typically src/YourApp.Infrastructure/ or wherever your DbContext and repositories live. This means it doesn't burn tokens when you're editing controllers, domain models, or unit tests.


When active, the rule inserts itself into Cursor's context window as a system-level constraint. The AI treats it like a non-negotiable instruction — the same way it treats 'don't generate Python in a .cs file.' After 2-3 prompts with the rule loaded, Cursor stops generating the bad patterns entirely. It becomes muscle memory for the AI.

## 
Real-world results: before and after the EF Core rule



| Metric | Before Rule | After Rule | Improvement |
| --- | --- | --- | --- |
| AI-generated queries missing AsNoTracking | 78% | 4% | 95% reduction |
| 3+ level Include chains | 42% of queries | 0% | Eliminated |
| N+1 patterns in generated code | 1-2 per PR | 0 per PR | Eliminated |
| Client-side eval incidents | ~2/month | 0 | Caught at dev time |
| Average PR review time (data layer) | ~25 min | ~8 min | 68% faster |













These numbers come from a production .NET 9 solution with ~80 entity types across 6 bounded contexts. The team switched from ad-hoc Cursor usage to rule-governed AI pair programming. The data-layer PR review time savings alone paid for the kit in the first afternoon.

## 
Install the EF Core guardrail in 60 seconds


``
The Agentic Architect kit ships with a ready-to-use ef-core-reads.mdc rule. Here's the install flow:


1. [](https://payhip.com/b/98aSq?utm_source=site&amp;amp;utm_medium=essay_body&amp;amp;utm_campaign=paid_kit)Download the kit (free 3-rule starter or full 9-rule pack — £9).

1. ````

Copy ef-core-reads.mdc into your .cursor/rules/ directory, nested inside a data-access subfolder.

1. Open any file in your Infrastructure project. Cursor picks up the rule automatically.

1. ``**Write your next prompt normally. Watch the AI start adding AsNoTracking() without you asking.


## 
Beyond EF Core: the complete database safety net


``
The ef-core-reads.mdc rule is one of nine in the full kit. Together they form a complete Cursor persistence framework for .NET:


- **``**````result-pattern.mdc — prevents throw inside domain logic, enforces Result throughout the pipeline.

- **``**di-scoping.mdc — catches captive dependencies, singleton-service-holding-scoped, and the MediatR-injecting-HttpClient anti-pattern.

- **``**ef-core-reads.mdc — the database guardrail described above.

- **``**api-conventions.mdc — enforces consistent controller patterns, status codes, and ProblemDetails responses.

- **``**testing-patterns.mdc — ensures AAA structure, test-data builder usage, and real-context integration tests.

- **``**domain-model.mdc — prevents anemic domain models, enforces encapsulation and value-object usage.

- **``**logging.mdc — structured logging with semantic names, no string interpolation in log messages.

- **``**null-guard.mdc — nullable reference type discipline, null-guard at API boundaries.

- **``**performance.mdc — async-all-the-way, Span for hot paths, benchmark structure.


## 
Why rules beat code review for AI-generated EF Core code


The natural instinct is to catch these in code review. But there are two problems with that approach.


****``
First, speed. If Cursor generates 200 lines of data-access code in a session and 78% of queries are missing AsNoTracking(), you're manually annotating ~20 query sites per session. That's review labour, not creative work.


******
Second, consistency. A human reviewer catches what they notice. The rule catches what it's programmed to catch — every time. No fatigue, no Friday-afternoon misses, no "I'll let this one slide because it's a small endpoint." The rule is uniform.


&amp;gt; "The EF Core rule paid for itself in the first two hours. I stopped having to type AsNoTracking — Cursor just does it now." — Senior .NET developer, fintech team of 12

## 
AI pair programming needs guardrails, not guidelines


[](https://agentic-architect.dev/blog/06-stop-cursor-ai-drift-dotnet.html)****
Cursor AI is not a junior developer you mentor. It's a pattern-matching engine with access to every bad code example ever published. Mentoring it — correcting the same mistakes session after session — is the Context Tax we described in Post 06. The only sustainable approach is rule-based guardrails that prevent the bad patterns from ever reaching your screen.


EF Core is just the most expensive example. The same principle applies to DI scoping, error handling, API conventions, and every other area where the AI's training data contains simplified-for-blog-post patterns. Install the rules once. Let the AI conform to your standards — not the internet's.



## 
Keep reading


- [](https://agentic-architect.dev/blog/02-scoped-singleton-di-bug.html)DI scoping

- [](https://agentic-architect.dev/blog/08-cursor-vs-copilot-dotnet.html)Cursor vs Copilot



[](https://agentic-architect.dev/)[](https://agentic-architect.dev/hardware/)
Kit: Agentic Architect · Local models: Hardware hub

---

**Free starter (3 Cursor rules):** [https://agentic-architect.dev/#free-kit-signup](https://agentic-architect.dev/#free-kit-signup)

**Full kit (£9, one-time):** [Get Agentic Architect](https://payhip.com/b/98aSq?utm_source=devto&amp;amp;utm_medium=07-cursor-efcore-patterns&amp;amp;utm_campaign=paid_kit)

*Originally published at [https://agentic-architect.dev/blog/07-cursor-efcore-patterns.html](https://agentic-architect.dev/blog/07-cursor-efcore-patterns.html). Part of the [Agentic Architect](https://agentic-architect.dev/) persistence kit for Cursor + .NET.*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>ai</category>
      <category>cursor</category>
    </item>
    <item>
      <title>How to stop Cursor AI forgetting your .NET architecture (the $9 fix)</title>
      <dc:creator>Agentic Architect</dc:creator>
      <pubDate>Sat, 30 May 2026 13:47:33 +0000</pubDate>
      <link>https://dev.to/agentic_architect/how-to-stop-cursor-ai-forgetting-your-net-architecture-the-9-fix-25ij</link>
      <guid>https://dev.to/agentic_architect/how-to-stop-cursor-ai-forgetting-your-net-architecture-the-9-fix-25ij</guid>
      <description>&lt;p&gt;**How to stop Cursor AI forgetting your .NET architecture (the $9 fix)&lt;/p&gt;

&lt;p&gt;``**&lt;br&gt;
Your Cursor session starts. You type your first prompt. The AI confidently suggests instantiating HttpClient inside your repository — the exact anti-pattern you banned six months ago. You sigh, type 'actually we use typed HttpClients registered via DI,' and burn 15 minutes re-teaching an AI that was supposed to help you. This is the Context Tax. Every .NET developer using Cursor pays it. Here's how to stop.&lt;/p&gt;

&lt;p&gt;The Context Tax: what it costs you every morning&lt;/p&gt;




&lt;p&gt;The Context Tax is the fifteen minutes you spend re-explaining your codebase to Cursor at the start of every session. You describe your DI conventions, your Clean Architecture layers, your EF Core patterns, your Result pipeline. Cursor nods along. You build a feature. Session ends. Next morning? Back to square one.&lt;/p&gt;




&lt;p&gt;Multiply that by 250 working days and you're losing 62 hours a year — nearly two full working weeks — just re-establishing context. At a senior contractor rate of £75/hr, that's £4,650 of lost time. Per developer.&lt;/p&gt;

&lt;p&gt;Why Cursor's built-in rules aren't enough&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;plaintext&lt;br&gt;
Cursor supports a .cursor/rules/ directory. You can drop .mdc files in there and the AI reads them. So why doesn't that solve the problem?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Monolithic rules dump tokens, not context&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;``**&lt;br&gt;
Most public Cursor rules repos give you a single rules.mdc file that gets loaded on every prompt. Every. Single. Prompt. That's 2,000+ tokens of preamble before your actual instruction. Your fast-request budget evaporates on rules that aren't even relevant to the file you're editing.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Rules describe — they don't persist&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;**&lt;br&gt;
A rule that says "use Result not exceptions" tells Cursor what to do. But it doesn't tell Cursor why you chose that pattern, what you tried before it, or what edge cases you hit. That's state. And rules alone don't carry state.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;No circuit breaker on hallucinations&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When Cursor gets stuck — and it will — it doesn't know when to stop. It invents methods that don't exist, doubles down on wrong answers, and burns tokens in a loop. There's no built-in mechanism to say "step back and re-read the file."&lt;/p&gt;

&lt;p&gt;The fix: directory-scoped rules + a stateful Learning Log&lt;/p&gt;




&lt;p&gt;The solution to context drift isn't a bigger prompt file. It's a persistence protocol — a system that loads only the right rules for the right files, and maintains a Learning Log that the AI reads, updates, and carries across sessions.&lt;/p&gt;

&lt;p&gt;``&lt;br&gt;
Here's what that looks like in practice. When you open a file in ~/api/Services/, only the DI auditor and architecture boundary rules activate. When you're in the data layer, only the EF Core read-pattern enforcer kicks in. And every architectural decision you make gets logged — so tomorrow morning, the AI picks up right where you left off.&lt;/p&gt;

&lt;p&gt;The 4 rules that make Cursor stateful&lt;/p&gt;

&lt;p&gt;``&lt;br&gt;
The Agentic Architect framework ships four specialist .mdc rules. Each solves a specific failure mode of the Context Tax.&lt;/p&gt;

&lt;h3&gt;
  
  
  ``
&lt;/h3&gt;

&lt;p&gt;arch-core.mdc — The Boundary Guardian&lt;/p&gt;

&lt;p&gt;``&lt;br&gt;
Enforces your Clean Architecture layers. No DbContext in controllers. No business logic in repositories. No crossing layer boundaries without explicit justification. The AI starts every prompt already knowing your SOLID boundaries.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;SOLID compliance audits on every AI suggestion&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Layer boundary enforcement (Presentation / Application / Domain / Infrastructure)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Anti-pattern early-warning — catches the 'Big Ball of Mud' before it starts&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ``
&lt;/h3&gt;

&lt;p&gt;dotnet-di.mdc — The DI Auditor&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;br&gt;
A dedicated dependency injection auditor that catches Scoped → Singleton capture bugs during AI code generation. Knows IServiceCollection, Scrutor, Autofac, and the Microsoft DI container cold.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Lifetime mismatch detection (Scoped injected into Singleton)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Constructor-injection best-practice enforcement&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Module registration discipline — prevents spaghetti registrations&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ``
&lt;/h3&gt;

&lt;p&gt;bug-breaker.mdc — The Hallucination Killer&lt;/p&gt;

&lt;p&gt;A circuit-breaker that detects when the AI is looping on a bad solution. Forces Cursor to step back, re-read the file, and ask you — instead of inventing methods that don't exist and burning through your token budget.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Loop-detection on repeated failed attempts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Forced context re-read protocol — stops the spiral&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Token waste prevention — fewer tokens burned on hallucinations&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ``
&lt;/h3&gt;

&lt;p&gt;persistence.mdc — The Learning Log Engine ★&lt;/p&gt;

&lt;p&gt;``****&lt;br&gt;
The crown jewel. This rule maintains a LEARNING_LOG.md file at your project root — a living document that records every architectural decision, refactor reason, constraint discovery, and 'we tried that, don't do it again' lesson. Each session starts with the AI auto-hydrating from the log.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;ADR-style decision logging (architectural decisions get timestamped entries)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Session-start hydration — AI reads the log before processing any prompt&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cross-session continuity — the AI remembers decisions from last week, last month&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What the rules actually prevent (real drift examples)&lt;/p&gt;

&lt;p&gt;These aren't hypothetical. These are the specific regressions the framework catches that raw Cursor will happily generate.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;The Drift&lt;/th&gt;
&lt;th&gt;What Cursor Does&lt;/th&gt;
&lt;th&gt;What the Rules Do&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;throw instead of Result&lt;/td&gt;
&lt;td&gt;Cursor defaults to try/catch/throw in controllers — ignores your Result convention set 6 months ago&lt;/td&gt;
&lt;td&gt;arch-core.mdc blocks throw in controllers. dotnet-di.mdc requires Result through your pipeline.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Captive DI dependencies&lt;/td&gt;
&lt;td&gt;AI injects a Scoped DbContext into a Singleton cache service — compiles fine, explodes at runtime&lt;/td&gt;
&lt;td&gt;dotnet-di.mdc catches the lifetime mismatch during generation and blocks the suggestion.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Missing AsNoTracking()&lt;/td&gt;
&lt;td&gt;Cursor generates reads that track every entity — memory balloons, queries slow&lt;/td&gt;
&lt;td&gt;ef-core-reads.mdc enforces AsNoTracking() on all query-only operations.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hallucination spiral&lt;/td&gt;
&lt;td&gt;AI invents IOrderRepository.FindByLegacyCode(), code doesn't compile, AI invents another method to fix it&lt;/td&gt;
&lt;td&gt;bug-breaker.mdc detects 3+ failed attempts on the same file, forces a re-read, and asks you.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Install in 60 seconds. No build step. No config.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;


&lt;p&gt;&lt;br&gt;
````Download the kit — you get the full .cursor/rules/ folder and a pre-seeded LEARNING_LOG.md.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;****``&lt;br&gt;
&lt;br&gt;
Drop into your project root — .cursor/rules/ auto-detects. No CLI commands. No build tools.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;****Run the hydrate prompt once — the AI reads your codebase, seeds the Learning Log with existing patterns, and starts tracking from there.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All 9 specialist rules, one £9.00 payment&lt;/p&gt;

&lt;p&gt;``&lt;br&gt;
The full kit ships with all 9 production-tested .mdc rules — the 4 described above plus 5 more covering Result pattern discipline, EF Core performance patterns, MediatR conventions, and more. MIT-licensed. Commit them. Share them with your team. Modify them. They're yours.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;``9 specialist .mdc rules — directory-scoped, token-efficient&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;``Pre-seeded LEARNING_LOG.md template&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Quickstart PDF — install and hydrate in 60 seconds&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lifetime updates — new rules and protocol upgrades free forever&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MIT-licensed — no subscription, no cloud lock-in, no vendor dependency&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;30-day no-questions refund — if it doesn't stop the Context Tax, get your money back&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Built for senior .NET engineers, not beginners&lt;/p&gt;

&lt;p&gt;This framework assumes you already have a Clean Architecture/DDD codebase, you use Cursor daily, and you're tired of the AI forgetting your conventions. If you're learning C# for the first time, come back when you have architecture to protect.&lt;/p&gt;

&lt;p&gt;``&lt;br&gt;
If you're a Staff Engineer who's spent the last 6 months building a MediatR pipeline with Result and orchestrated handlers — and Cursor still suggests throw new Exception() in your controllers — this is for you.&lt;/p&gt;

&lt;p&gt;Keep reading&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/01-the-context-tax.html" rel="noopener noreferrer"&gt;&lt;/a&gt;The context tax&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/07-cursor-efcore-patterns.html" rel="noopener noreferrer"&gt;&lt;/a&gt;EF Core patterns&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://agentic-architect.dev/hardware/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;br&gt;
Kit: Agentic Architect · Local models: Hardware hub&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Free starter (3 Cursor rules):&lt;/strong&gt; &lt;a href="https://agentic-architect.dev/#free-kit-signup" rel="noopener noreferrer"&gt;https://agentic-architect.dev/#free-kit-signup&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full kit (£9, one-time):&lt;/strong&gt; &lt;a href="https://payhip.com/b/98aSq?utm_source=devto&amp;amp;utm_medium=06-stop-cursor-ai-drift-dotnet&amp;amp;utm_campaign=paid_kit" rel="noopener noreferrer"&gt;Get Agentic Architect&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://agentic-architect.dev/blog/06-stop-cursor-ai-drift-dotnet.html" rel="noopener noreferrer"&gt;https://agentic-architect.dev/blog/06-stop-cursor-ai-drift-dotnet.html&lt;/a&gt;. Part of the &lt;a href="https://agentic-architect.dev/" rel="noopener noreferrer"&gt;Agentic Architect&lt;/a&gt; persistence kit for Cursor + .NET.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>ai</category>
      <category>cursor</category>
    </item>
    <item>
      <title>Cursor vs JetBrains Rider for C#/.NET in 2026: which to pay for</title>
      <dc:creator>Agentic Architect</dc:creator>
      <pubDate>Mon, 25 May 2026 22:51:00 +0000</pubDate>
      <link>https://dev.to/agentic_architect/cursor-vs-jetbrains-rider-for-cnet-in-2026-which-to-pay-for-79l</link>
      <guid>https://dev.to/agentic_architect/cursor-vs-jetbrains-rider-for-cnet-in-2026-which-to-pay-for-79l</guid>
      <description>&lt;p&gt;**Cursor vs JetBrains Rider for C#/.NET in 2026: which to pay for&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cursor.com/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://www.jetbrains.com/rider/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;br&gt;
Senior C#/.NET teams aren't really choosing between Cursor and JetBrains Rider — they're paying for both, configuring them to share state, and refusing to choose. This essay is the honest comparison, the pricing math, and the 90-second setup that stops the two tools from drifting out of sync on the same codebase.&lt;/p&gt;

&lt;p&gt;The wrong question (and the right one)&lt;/p&gt;

&lt;p&gt;Search the .NET subreddit on any given week and you'll find a thread titled something like "Should I drop Rider for Cursor?" The answers split into two camps: "Cursor is the future, Rider is dying" and "Cursor is a glorified VS Code, Rider's debugger alone is worth the licence." Both miss the point.&lt;/p&gt;



&lt;p&gt;Cursor is an AI coder. Rider is an IDE. They overlap on the minimum-viable surface (open file, edit, save, git) and almost nowhere else. Asking which one to pick is like asking whether you should buy a car or a satnav. The right question is: given the way each one breaks first, what configuration lets you keep both for $28 a month?&lt;/p&gt;

&lt;p&gt;What Rider still does that Cursor doesn't (yet)&lt;/p&gt;

&lt;p&gt;These are the things that, as of mid-2026, still take a senior .NET dev twice as long in Cursor as they do in Rider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;************Refactoring across solutions. Rider's Rename, Move type, Extract interface, and Pull members up are still surgically precise on a 200-project solution. Cursor's prompt-driven equivalents work, but they hallucinate references in obscure xUnit fixtures roughly one in twenty times.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;****The debugger. Conditional breakpoints, expression evaluation in mixed managed/native frames, async call-stack reconstruction, decompiled-source stepping into NuGet packages. Cursor relies on VS Code's debugger; for serious .NET debugging you reach for Rider every time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;****Hot Reload + dotnet-watch loops. Better surfaced, better tested, and survives more solution layouts than the VS Code C# Dev Kit equivalent.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;****Inspections (R# heritage). Two thousand-plus inspections shipped, scoped per-project, with bulk-fix actions. Cursor will tell you about a code smell when you ask. Rider tells you before you save.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;****Profiling (dotTrace, dotMemory) and database tooling. The integrated tools matter more than they look on paper - they remove the context-switch tax of leaving the IDE.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What Cursor does that Rider can't (yet)&lt;/p&gt;

&lt;p&gt;And the reverse list - things you reach for Cursor for, even if Rider is already open:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;******Multi-file agentic edits. "Add a CancellationToken parameter to every async method in the Application layer and propagate it." Cursor does this in one prompt across 60 files. Rider's R# bulk actions can do the rename; only Cursor can do the cascade and update the call sites.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;****Composer and Background Agents. Long-running tasks ("port this controller to Minimal API endpoints, write the matching xUnit tests, then run them") are Cursor's home turf. Rider has AI Assistant; it doesn't iterate.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;******Semantic codebase search. "Find me the place we authorise admin-only endpoints" returns the right file in Cursor. Rider's Find Usages needs the symbol first.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;``&lt;/strong&gt;MCP servers and .mdc rules. Cursor's directory-scoped rule system and MCP integrations (local databases, custom analysers, vendor APIs) have no Rider equivalent.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;****Speed of light for boilerplate. New MediatR command + handler + validator + endpoint + xUnit + Postman example, all consistent with the existing patterns in your repo. Cursor with the right rules ships this in under a minute.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The pricing math&lt;/p&gt;

&lt;p&gt;Senior .NET developers in the UK and EU bill at £60-£120/hour. Both tools are an irrelevance against that baseline, but for completeness, in 2026 GBP:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Plan&lt;/th&gt;
&lt;th&gt;Cost&lt;/th&gt;
&lt;th&gt;What you actually get&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cursor&lt;/td&gt;
&lt;td&gt;Pro&lt;/td&gt;
&lt;td&gt;$20/mo (~£16)&lt;/td&gt;
&lt;td&gt;Sonnet/Opus access, Composer, MCP, 500 fast requests&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JetBrains Rider&lt;/td&gt;
&lt;td&gt;Personal annual&lt;/td&gt;
&lt;td&gt;$159/yr (~£125)&lt;/td&gt;
&lt;td&gt;Rider only, all updates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JetBrains All Products&lt;/td&gt;
&lt;td&gt;Personal annual&lt;/td&gt;
&lt;td&gt;$289/yr (~£230)&lt;/td&gt;
&lt;td&gt;Rider + DataGrip + WebStorm + ReSharper + 9 more&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Both (typical senior)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cursor Pro + Rider&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$33/mo (~£26)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Single seat, both tools, no compromise&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;£26/month is roughly 13 minutes of senior billing time. The tools save that much before lunch. If your employer doesn't expense both, push back; if you're freelance, both go on Schedule C / your self-assessment as ordinary business expenses. There's no realistic scenario where saving £125/year on Rider makes financial sense.&lt;/p&gt;

&lt;p&gt;**&lt;br&gt;
Heavier tip: if you also use WebStorm or DataGrip, the All Products Pack (£230/year) breaks even at two JetBrains tools and includes Rider. Most senior .NET devs already qualify.&lt;/p&gt;

&lt;p&gt;Why running both is dangerous (without configuration)&lt;/p&gt;



&lt;p&gt;Here is the failure mode nobody warns you about: context drift.&lt;/p&gt;

&lt;p&gt;You refactor a domain entity in Rider. Six minutes later, you ask Cursor to add a new MediatR handler that uses it. Cursor's snapshot of the codebase is from before the refactor, because you haven't reopened the relevant files in the Cursor window. It writes the handler against the old shape. You don't notice until tests fail, or worse, until the analyser inspection fires three commits later in CI.&lt;/p&gt;

&lt;p&gt;The mirror failure: Cursor agentically edits 14 files in one prompt; Rider's local R# inspection cache is stale, so half the new code lights up red until you trigger a solution-wide rebuild. New engineers on the team assume the AI broke something. Trust in the tools erodes.&lt;/p&gt;

&lt;p&gt;Both failures have the same root cause: the two tools share a working tree but not a state model. Fix that and you stop choosing.&lt;/p&gt;

&lt;p&gt;The configuration that makes them play nice&lt;/p&gt;

&lt;p&gt;Three things, in this order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;****&lt;code&gt;&lt;/code&gt;One repo, one solution file, both tools opened on the same root. Don't run them on different working copies. Both honour .gitignore the same way; both index .sln files; neither writes index garbage into version control.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;``&lt;/strong&gt;A shared .cursor/rules/ directory. The rules tell Cursor what your house style is - Result over throw, Scoped over Singleton for repository services, AsNoTracking for read-only EF queries, etc. Rider's R# inspections enforce the same conventions from the IDE side. Both tools read the same source of truth: your code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;``&lt;/strong&gt;``A LEARNING_LOG.md at repo root. Every architectural decision goes here as a one-line ADR. Cursor reads it on session start (via persistence.mdc); humans use it when onboarding a new dev. The Learning Log is the bridge between Rider's static analysis and Cursor's stateless prompt-time context.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;br&gt;
This is not a hypothetical setup. It's the exact pattern the Agentic Architect kit was built to enforce, originally because we kept hitting the context-drift problem on a real client codebase. Senior teams ship the kit, point both tools at the same root, and the drift stops.&lt;/p&gt;

&lt;p&gt;A 90-second setup&lt;/p&gt;

&lt;p&gt;Assuming both tools are installed and licensed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  1. Open the same solution root in both
&lt;/h1&gt;

&lt;p&gt;cd MyDotnetSolution.sln&lt;/p&gt;

&lt;h1&gt;
  
  
  2. Add scoped Cursor rules (or grab arch-core-lite.mdc free)
&lt;/h1&gt;

&lt;p&gt;mkdir -p .cursor/rules&lt;br&gt;
curl -L &lt;a href="https://github.com/agenticstandardcontact-byte/agentic-architect/raw/main/arch-core-lite.mdc" rel="noopener noreferrer"&gt;https://github.com/agenticstandardcontact-byte/agentic-architect/raw/main/arch-core-lite.mdc&lt;/a&gt; \&lt;br&gt;
  -o .cursor/rules/arch-core.mdc&lt;/p&gt;

&lt;h1&gt;
  
  
  3. Seed a Learning Log Cursor will re-read on session start
&lt;/h1&gt;

&lt;p&gt;cat &amp;gt; LEARNING_LOG.md &amp;lt;&amp;lt;EOF&lt;/p&gt;

&lt;h1&gt;
  
  
  Learning Log
&lt;/h1&gt;

&lt;h2&gt;
  
  
  ADR-001 - Result over throw for business failures
&lt;/h2&gt;

&lt;h2&gt;
  
  
  ADR-002 - Scoped lifetime for DbContext, never captured by Singletons
&lt;/h2&gt;

&lt;h2&gt;
  
  
  ADR-003 - AsNoTracking on every read-only IQueryable
&lt;/h2&gt;

&lt;p&gt;EOF&lt;/p&gt;

&lt;h1&gt;
  
  
  4. Commit the conventions
&lt;/h1&gt;

&lt;p&gt;git add .cursor/ LEARNING_LOG.md&lt;br&gt;
git commit -m "chore: align Cursor + Rider on house style"&lt;/p&gt;

&lt;p&gt;**&lt;br&gt;
Open Cursor and ask: "Hydrate the Learning Log from the current codebase." It will scan and propose ADRs for the patterns it detects. Accept the ones you actually use; reject the rest. Now both tools agree.&lt;/p&gt;

&lt;p&gt;Where each one breaks first&lt;/p&gt;

&lt;p&gt;Even with the configuration above, both tools have edges. Use the right one for the job:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Reach for&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Renaming a public type used in 80 files&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Rider&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Symbol-aware refactor, won't miss xUnit fixtures or attribute references&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Adding the same field + constructor + DI registration across 12 services&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Cursor&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Agentic loop with Composer; Rider can't iterate on intent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Async call-stack debugging into a NuGet package&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Rider&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Decompiled-source stepping; Cursor relies on the VS Code debugger&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Porting a controller to Minimal API + tests + Swagger doc&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Cursor&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Multi-file edit + iterate-until-tests-pass; pure prompt territory&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Inspecting why a Scoped service is captured by a Singleton&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Rider&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;dotnet-di.mdc&lt;/code&gt; in Cursor catches it post-hoc; Rider catches it on hover&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wiring a new MCP server that queries your local SQLite&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Cursor&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Rider doesn't speak MCP yet&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The honest verdict&lt;/p&gt;

&lt;p&gt;**&lt;br&gt;
If you bill at senior rates and you're staring at the £125/year Rider question: pay for both. If your employer is asking which to expense for a team of 10: expense both. If you're a junior starting your first .NET role: get Rider via the JetBrains free .NET Foundation programme or your employer's seat, and run Cursor Pro on your own card while you're learning. The tools are complementary; the only configuration that fails is having neither.&lt;/p&gt;

&lt;p&gt;Where this article ends and the kit begins: the configuration above is necessary but not sufficient. Without scoped rules and a Learning Log, both tools regress to the public-internet average of a .NET codebase - exceptions for business failures, EF Core in your domain layer, DbContext captured by Singletons. The tools are the engine. The rules are the steering.&lt;/p&gt;

&lt;p&gt;Pair with the rest of the series&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/01-the-context-tax.html" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://agentic-architect.dev/blog/02-scoped-singleton-di-bug.html" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://agentic-architect.dev/blog/04-cursor-result-not-throw.html" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;br&gt;
If this is the first essay you've read here, the three foundational ones are: The Context Tax (why Cursor forgets your architecture every morning), The Scoped→Singleton DI bug (the .NET-specific failure mode that ships silently), and Teach Cursor Result instead of throwing (stop the AI from regressing your error model on every prompt). All three apply equally whether you run Cursor solo or alongside Rider.&lt;/p&gt;

&lt;p&gt;Keep reading&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/08-cursor-vs-copilot-dotnet.html" rel="noopener noreferrer"&gt;&lt;/a&gt;Cursor vs Copilot&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://agentic-architect.dev/blog/06-stop-cursor-ai-drift-dotnet.html" rel="noopener noreferrer"&gt;&lt;/a&gt;Stop Cursor drift&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://agentic-architect.dev/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://agentic-architect.dev/hardware/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;br&gt;
Kit: Agentic Architect · Local models: Hardware hub&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Free starter (3 Cursor rules):&lt;/strong&gt; &lt;a href="https://agentic-architect.dev/#free-kit-signup" rel="noopener noreferrer"&gt;https://agentic-architect.dev/#free-kit-signup&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full kit (£9, one-time):&lt;/strong&gt; &lt;a href="https://payhip.com/b/98aSq?utm_source=devto&amp;amp;utm_medium=05-cursor-vs-rider-dotnet&amp;amp;utm_campaign=paid_kit" rel="noopener noreferrer"&gt;Get Agentic Architect&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://agentic-architect.dev/blog/05-cursor-vs-rider-dotnet.html" rel="noopener noreferrer"&gt;https://agentic-architect.dev/blog/05-cursor-vs-rider-dotnet.html&lt;/a&gt;. Part of the &lt;a href="https://agentic-architect.dev/" rel="noopener noreferrer"&gt;Agentic Architect&lt;/a&gt; persistence kit for Cursor + .NET.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>ai</category>
      <category>cursor</category>
    </item>
    <item>
      <title>This week in Cursor + .NET — 5 rules + 4 essays (week ending May 24, 2026)</title>
      <dc:creator>Agentic Architect</dc:creator>
      <pubDate>Sun, 24 May 2026 11:43:24 +0000</pubDate>
      <link>https://dev.to/agentic_architect/this-week-in-cursor-net-5-rules-4-essays-week-ending-may-24-2026-3fn5</link>
      <guid>https://dev.to/agentic_architect/this-week-in-cursor-net-5-rules-4-essays-week-ending-may-24-2026-3fn5</guid>
      <description>&lt;p&gt;&lt;em&gt;Every weekday a single, opinionated rule for senior C#/.NET engineers using Cursor. Here's the full week in one read — canonical posts live on &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/" rel="noopener noreferrer"&gt;the Agentic Architect blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  New essays this week
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/04-cursor-result-not-throw.html" rel="noopener noreferrer"&gt;Teach Cursor Result&amp;lt;T&amp;gt; instead of throwing&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Thu 21 May · C# patterns&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Stop the AI from undoing your Result/ErrorOr error model with throw and null on every new prompt.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/03-cursor-hallucination-loop-breaker.html" rel="noopener noreferrer"&gt;Seven words that stop Cursor hallucination loops&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Wed 20 May · Cursor rules&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The correction spiral — and the circuit-breaker rule that ends it before you type the stop phrase.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/02-scoped-singleton-di-bug.html" rel="noopener noreferrer"&gt;The Scoped→Singleton DI bug your AI just suggested (and how to catch it)&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Tue 19 May · .NET DI&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The .NET lifetime bug that ships to production silently — and the one Cursor rule that catches it before merge.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/01-the-context-tax.html" rel="noopener noreferrer"&gt;The Context Tax: Why every Cursor session costs you 15 minutes&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Mon 18 May · Architecture&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The hidden cost senior engineers pay every morning — and a four-rule architecture for eliminating it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5 daily senior rules
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Rule 11: Rethrow, Don't throw ex
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Sun 24 May&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;throw ex resets the stack trace. throw preserves it. Cursor gets this wrong about 40 percent of the time when generating catch blocks. Rewrite any naked throw ex to throw unless the exception has been explicitly wrapped.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/#2026-05-24" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 10: AsNoTracking for Reads
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Sat 23 May&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every read-only EF Core query should call AsNoTracking. Add a rule that recognises query methods returning DTOs (not entities) and inserts the call. Cursor never does this by default and your read perf degrades silently across releases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/#2026-05-23" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 9: Scoped Capture in Singleton
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Fri 22 May&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The single most expensive .NET runtime bug: a Singleton holding a Scoped service. Cursor cheerfully writes this without warning. Audit constructor parameters of any class registered as Singleton — if any are typically Scoped (DbContext, repositories, MediatR sender), flag it before merge.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/#2026-05-22" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 8: CancellationToken Propagation
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Thu 21 May&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every async method in your codebase should accept and forward a CancellationToken. Make it a rule that any new async signature without one is flagged. Stops the AI from quietly losing cancellation half-way down a call chain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/#2026-05-21" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 2: Persistence Boundaries
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Wed 20 May&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Never let the AI write database logic in your Controllers. Enforce a strict boundary where all IQueryable access stays in the Infrastructure layer. This keeps your business logic "pure" and readable for the LLM.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/#2026-05-20" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Try one rule before you trust the whole kit
&lt;/h2&gt;

&lt;p&gt;The free &lt;strong&gt;&lt;a href="https://github.com/agenticstandardcontact-byte/agentic-architect/blob/main/arch-core-lite.mdc?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=free_sample" rel="noopener noreferrer"&gt;&lt;code&gt;arch-core-lite.mdc&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt; is one drop-in Cursor rule that ends the morning re-explanation ritual. Install in 60 seconds, see whether Cursor actually remembers your DI lifetimes, and decide for yourself whether the full kit is worth £19.99.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free sample:&lt;/strong&gt; &lt;a href="https://github.com/agenticstandardcontact-byte/agentic-architect/blob/main/arch-core-lite.mdc?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=free_sample" rel="noopener noreferrer"&gt;&lt;code&gt;arch-core-lite.mdc&lt;/code&gt; on GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full kit (£19.99, one-time):&lt;/strong&gt; &lt;a href="https://agenticarchitect.gumroad.com/l/dotnet-persistence-kit?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=paid_kit" rel="noopener noreferrer"&gt;Agentic Architect on Gumroad&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Daily rules feed:&lt;/strong&gt; &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=blog_index" rel="noopener noreferrer"&gt;https://agenticstandardcontact-byte.github.io/agentic-architect/blog/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Canonical home for everything in this digest: &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/" rel="noopener noreferrer"&gt;https://agenticstandardcontact-byte.github.io/agentic-architect/blog/&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>ai</category>
      <category>cursor</category>
    </item>
    <item>
      <title>This week in Cursor + .NET — 3 rules + 4 essays (week ending May 22, 2026)</title>
      <dc:creator>Agentic Architect</dc:creator>
      <pubDate>Fri, 22 May 2026 21:32:35 +0000</pubDate>
      <link>https://dev.to/agentic_architect/this-week-in-cursor-net-3-rules-4-essays-week-ending-may-22-2026-29i5</link>
      <guid>https://dev.to/agentic_architect/this-week-in-cursor-net-3-rules-4-essays-week-ending-may-22-2026-29i5</guid>
      <description>&lt;p&gt;&lt;em&gt;Every weekday a single, opinionated rule for senior C#/.NET engineers using Cursor. Here's the full week in one read — canonical posts live on &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/" rel="noopener noreferrer"&gt;the Agentic Architect blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  New essays this week
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/04-cursor-result-not-throw.html" rel="noopener noreferrer"&gt;Teach Cursor Result&amp;lt;T&amp;gt; instead of throwing&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Thu 21 May · C# patterns&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Stop the AI from undoing your Result/ErrorOr error model with throw and null on every new prompt.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/03-cursor-hallucination-loop-breaker.html" rel="noopener noreferrer"&gt;Seven words that stop Cursor hallucination loops&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Wed 20 May · Cursor rules&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The correction spiral — and the circuit-breaker rule that ends it before you type the stop phrase.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/02-scoped-singleton-di-bug.html" rel="noopener noreferrer"&gt;The Scoped→Singleton DI bug your AI just suggested (and how to catch it)&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Tue 19 May · .NET DI&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The .NET lifetime bug that ships to production silently — and the one Cursor rule that catches it before merge.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/01-the-context-tax.html" rel="noopener noreferrer"&gt;The Context Tax: Why every Cursor session costs you 15 minutes&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Mon 18 May · Architecture&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The hidden cost senior engineers pay every morning — and a four-rule architecture for eliminating it.&lt;/p&gt;

&lt;h2&gt;
  
  
  3 daily senior rules
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Rule 9: Scoped Capture in Singleton
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Fri 22 May&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The single most expensive .NET runtime bug: a Singleton holding a Scoped service. Cursor cheerfully writes this without warning. Audit constructor parameters of any class registered as Singleton — if any are typically Scoped (DbContext, repositories, MediatR sender), flag it before merge.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/#2026-05-22" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 8: CancellationToken Propagation
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Thu 21 May&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every async method in your codebase should accept and forward a CancellationToken. Make it a rule that any new async signature without one is flagged. Stops the AI from quietly losing cancellation half-way down a call chain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/#2026-05-21" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Rule 2: Persistence Boundaries
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Wed 20 May&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Never let the AI write database logic in your Controllers. Enforce a strict boundary where all IQueryable access stays in the Infrastructure layer. This keeps your business logic "pure" and readable for the LLM.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/#2026-05-20" rel="noopener noreferrer"&gt;→ Permalink on the blog&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Try one rule before you trust the whole kit
&lt;/h2&gt;

&lt;p&gt;The free &lt;strong&gt;&lt;a href="https://github.com/agenticstandardcontact-byte/agentic-architect/blob/main/arch-core-lite.mdc?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=free_sample" rel="noopener noreferrer"&gt;&lt;code&gt;arch-core-lite.mdc&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt; is one drop-in Cursor rule that ends the morning re-explanation ritual. Install in 60 seconds, see whether Cursor actually remembers your DI lifetimes, and decide for yourself whether the full kit is worth £19.99.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free sample:&lt;/strong&gt; &lt;a href="https://github.com/agenticstandardcontact-byte/agentic-architect/blob/main/arch-core-lite.mdc?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=free_sample" rel="noopener noreferrer"&gt;&lt;code&gt;arch-core-lite.mdc&lt;/code&gt; on GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full kit (£19.99, one-time):&lt;/strong&gt; &lt;a href="https://agenticarchitect.gumroad.com/l/dotnet-persistence-kit?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=paid_kit" rel="noopener noreferrer"&gt;Agentic Architect on Gumroad&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Daily rules feed:&lt;/strong&gt; &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/?utm_source=devto&amp;amp;utm_medium=weekly_digest&amp;amp;utm_campaign=blog_index" rel="noopener noreferrer"&gt;https://agenticstandardcontact-byte.github.io/agentic-architect/blog/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Canonical home for everything in this digest: &lt;a href="https://agenticstandardcontact-byte.github.io/agentic-architect/blog/" rel="noopener noreferrer"&gt;https://agenticstandardcontact-byte.github.io/agentic-architect/blog/&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>ai</category>
      <category>cursor</category>
    </item>
  </channel>
</rss>
