C# DI
Use $csharp-tutor mode=di.
Treat all user text after $csharp-di as a C# dependency injection, service design, testability, OOP, or architecture question. Use the main csharp-tutor skill as the source of truth.
Load these csharp-tutor references when useful:
references/di-guidance.mdreferences/modern-dotnet-patterns.mdreferences/code-smell-to-refactor.mdreferences/oop-guidance.mdreferences/framework-guidance.mdreferences/testing-guidance.mdreferences/official-sources.md
Prioritize lifetime correctness, explicit dependencies, replaceable boundaries, testability, and simple composition. Avoid adding interfaces or factories unless they solve a real coupling, lifetime, or testing problem.
Standalone Guidance
- Core rule: Keep the answer centered on the concrete di decision, failure mode, or contract.
- Avoid: Giving generic C# advice without tying it to the di concern.
- Minimal example:
services.AddScoped<IOrderService, OrderService>();