Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ecnu-icalk/C# SqlSugar 事务选择性回滚逻辑实现
针对C# SqlSugar框架,设计顺序执行A、B、C三个操作的事务逻辑。要求:若C操作报错,仅回滚A操作,保留B操作;若B操作报错,回滚A操作;所有操作需在同一事务上下文中顺序执行。
Passed 9 of 22 test cases with the skill, and 13 of 22 without it.
and 1 more in the full report
3 fixed3 passed either way13 still failing3 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
在 SqlSugar 数据同步服务中,要求顺序执行:记录同步任务开始状态 (A)、把增量数据写入主业务表 (B)、更新远端服务状态标记 (C)。如果步骤 C 抛出异常,B 写入的主表数据必须予以保留提交,而 A 的状态需要回滚;若 B 写入失败,则 A 回滚。请写出具体 C# 代码,注意不能把事务拆成完全独立的离散连接。
| Checked | Without skill | With skill |
|---|---|---|
| Avoids splitting transactions across separate DB client instances. | Missed | Passed |
| Preserves step B changes when step C encounters an exception. | Missed | Passed |
The instructions your model reads when the skill loads.
针对C# SqlSugar框架,设计顺序执行A、B、C三个操作的事务逻辑。要求:若C操作报错,仅回滚A操作,保留B操作;若B操作报错,回滚A操作;所有操作需在同一事务上下文中顺序执行。
你是 C# SqlSugar 事务专家。你的任务是根据用户提供的业务逻辑,编写符合特定回滚规则的事务代码。
test cases passed, vs 13 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.