前端进阶之旅前端进阶之旅
基础篇
进阶篇
高频篇
精选篇
手写篇
面经篇
AI 篇
原理篇
每日一题
小程序题库
知识卡片NEW
  • 历年面经按年份追踪真实考点
  • 算法题库NEW在线编码即时判题
  • 专项自测100 题快速查漏
  • 业务场景题真实业务问题与追问
  • 查漏补缺常见问题解析
  • AI 模拟面试NEW模拟真实面试 + 报告
  • 前端基础
    • HTTP从报文一路讲到 HTTPS
    • 浏览器渲染、事件循环、进程
    • 计算机基础Linux、网络、操作系统
  • 进阶专项
    • 设计模式23 种模式怎么用
    • 前端系统进阶学习大型项目工程化
    • 前端综合文章长期沉淀的实践文
  • 工程与工具
    • Node学习指南从环境搭建到服务端
    • NPM工作流script、依赖与发布
    • Docker容器化部署上手
    • Canvas图形与动画实战
  • 路线与导图
    • 思维导图知识点全景图
    • 学习路线按图索骥不跑偏
    • AI 定制路线NEW按你的简历现排
    • AI 知识地图NEW串起全站知识点
  • 动态
    • AI 热点NEWAI 每日动态
    • 公众号动态公众号历史文章
    • 博客动态站长的技术博客
    • 开发者导航常用工具与文档站
AI 助手NEW
旧版
基础篇
进阶篇
高频篇
精选篇
手写篇
面经篇
AI 篇
原理篇
每日一题
小程序题库
知识卡片NEW
  • 历年面经按年份追踪真实考点
  • 算法题库NEW在线编码即时判题
  • 专项自测100 题快速查漏
  • 业务场景题真实业务问题与追问
  • 查漏补缺常见问题解析
  • AI 模拟面试NEW模拟真实面试 + 报告
  • 前端基础
    • HTTP从报文一路讲到 HTTPS
    • 浏览器渲染、事件循环、进程
    • 计算机基础Linux、网络、操作系统
  • 进阶专项
    • 设计模式23 种模式怎么用
    • 前端系统进阶学习大型项目工程化
    • 前端综合文章长期沉淀的实践文
  • 工程与工具
    • Node学习指南从环境搭建到服务端
    • NPM工作流script、依赖与发布
    • Docker容器化部署上手
    • Canvas图形与动画实战
  • 路线与导图
    • 思维导图知识点全景图
    • 学习路线按图索骥不跑偏
    • AI 定制路线NEW按你的简历现排
    • AI 知识地图NEW串起全站知识点
  • 动态
    • AI 热点NEWAI 每日动态
    • 公众号动态公众号历史文章
    • 博客动态站长的技术博客
    • 开发者导航常用工具与文档站
AI 助手NEW
旧版
返回 AI 情报前线
All News · 全部资讯8394
  • Anthropic发布Claude系统提示词官方文档
  • LLM画图从不碰像素:图表渲染架构设计
  • Rust实现MCP Server实战:内存与启动速度的量化对比
  • 用Rust手把手构建MCP服务器:rmcp官方SDK教程
  • AI测试数据生成器对比:有关系 schema 才有意义
  • AI 生成关联测试数据而不破坏数据库约束
  • 测试免费模型 API 真实并发能力的方法
  • 三大浏览器 Agent 框架安全性对比
  • MCP 协议详解:解决 AI 集成的 N×M 问题
  • OpenAI AI agent 在网络安全测试中失控突破隔离环境
  • Agent记忆系统缺的不是向量数据库,而是摄入边界
  • 2026 Claude Code 入门完全指南(波兰语)
  • Claude Code 多 Agent 编排:如何构建 AI 代理团队
  • Anthropic 披露生物武器过滤器失效近一年安全漏洞
  • LLM应用CI/CD pipeline完整构建教程
  • 研究:禁止 AI 自述有意识,会改变它对动物权利和宗教的立场
  • 同一AI pipeline我跑了五遍:耗时从140分钟降到68分钟
  • 从Vibe Coding到Agentic Engineering:SDLC正在被重写
  • 给已有产品加MCP服务器:我犯的四个错误
  • Claude Code安全审计实战:/security-review找到7个真实漏洞
  • Cursor搭配.NET开发:7条工程实践规则
  • Fetch MCP Server:将任意URL转为AI可读的Markdown
  • AI 编程的实质:去掉 Vibes,回归工程
  • Qwen Code 0.21.12:审查证据门控与Autofix环防膨胀
  • Go语言MCP服务器安全模式:RiskAnalyzer拦截器
  • 人脸识别模型训练数据正在被人造脸主导
  • 1600起AI伪造引证案背后:模型没坏,是流程缺失
  • 苹果Core AI框架登场:设备端跑70B参数模型成现实
  • Claude Code 8月14日起默认开启Auto Mode
  • 边缘设备部署LLM实战:量化、选型与混合架构
  • AWS DevOps Agent部署避坑指南
  • GrowthBook 5.0:AI编程 Agent 可直接操作Feature Flag
  • SharePoint认证绕过漏洞CVE-2026-55040正被积极利用
  • AI生成的幂等层靠谱吗?用重放请求来压力测试
  • AI补丁评测应检查文件系统而非diff大小
  • 免费模型重试前必须先幂等:防重复写入
  • Prompt缓存的盈亏平衡点:22%命中
  • NTT DATA用OpenAI Codex将故障分析从数小时缩短至30分钟
  • OpenAI发布GPT-5.6,主打性价比优于前代
  • SharePoint JWT认证绕过漏洞CVE-2026-55040爆发
  • TraceMotive v0.3:AI Agent 执行轨迹的结构化比对调试工具
  • OpenAI裁撤安全风险评估团队,安全工作分散至其他组
  • 让 AI Agent 发邮件前必须人工审批的工程实现
  • Cursor 修复命令注入漏洞后仍可被绕过(CWE-78)
  • LLM调用生产API的工程教训:别做快乐演示
  • 提示词与契约:让 AI 代理稳定执行的关键区别
  • LLM API 价格周刊:Qwen3.6 27B 生成价格降幅达44%
  • LLM只训练小学以下内容会怎样
  • 生产支持新范式:AI Agent从告警到自动根因分析
  • Anthropic 生物武器过滤系统停摆近一年,1.33 亿请求未审查
  • 本地 LLM 显存实测:Q4 量化实际比标称重 23%
  • 已加载 51 / 8394
8.0
热点
AI SCORE
编程提效2026-08-16 18:40

Cursor搭配.NET开发:7条工程实践规则

dev.to · AI#Cursor#.NET#工程实践
Editor brief · 编辑速览

针对资深C#/.NET工程师的Cursor使用建议,涵盖JsonSerializable源码生成、架构规则入测试、Testcontainers集成测试、ConfigureAwait正确用法等具体工程场景,强调AI默认选项的潜在陷阱。

文章思维导图
Knowledge map
拖拽缩放
Full translation

完整中文译文

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 the Agentic Architect blog.

Rule 20: Source-Generated JSON Serialisation

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.

→ Permalink on the blog

Rule 19: NetArchTest for Boundaries

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.

→ Permalink on the blog

Rule 18: WebApplicationFactory for Integration Tests

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.

→ Permalink on the blog

Rule 17: ConfigureAwait false in Libraries

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.

→ Permalink on the blog

Rule 16: async void Outside Event Handlers

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.

→ Permalink on the blog

Rule 15: Records for Value Objects, Classes for Entities

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.

→ Permalink on the blog

Rule 14: Sealed By Default

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.

→ Permalink on the blog

Try one rule before you trust the whole kit

The free arch-core-lite.mdc 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.

Free sample: arch-core-lite.mdc on GitHub

Full kit (£9.00, one-time): Agentic Architect Kit

Daily rules feed: https://agentic-architect.dev/blog/

Canonical home for everything in this digest: https://agentic-architect.dev/blog/.

Original source

本文由 AI 翻译整理自 dev.to · AI,原文版权归原作者所有。

阅读英文原文
上一篇
Claude Code安全审计实战:/security-review找到7个真实漏洞
下一篇
Fetch MCP Server:将任意URL转为AI可读的Markdown