Use TimeProvider instead of DateTime.UtcNow in testable code
Inject TimeProvider when business logic depends on the current time, then control that time in tests.
Inject TimeProvider when business logic depends on the current time, then control that time in tests.
Fail during application startup when required configuration is missing or invalid instead of waiting for the first request.
Use HybridCache to avoid duplicate AI model calls, with a cached summarization example and deliberate cache-key design.
Skip EF Core change tracking for queries that only read entity data, but keep tracking for load-change-save updates.
Make a retried write replay the same operation instead of creating a duplicate side effect.
How to use the Bogus library to generate realistic, repeatable, and domain-shaped test data in .NET, including faker rules, related objects, seeds, and practical boundaries.
Prefer Task unless you have a measured allocation reason and a simple consumption contract.
Expose only the small, specific capabilities the agent needs for the current workflow.
Capture queryable fields first so dashboards are built on data, not text search.
Treat prompt changes like code changes: measure the behavior before deciding whether the edit helped.