⚙️ Dependency Injection
var b = WebApplication.CreateBuilder(args);b.Services.AddSingleton<IMy, My>();var app = b.Build();
Scopes: Singleton (app lifetime), Scoped (per-request), Transient (each resolve).
var b = WebApplication.CreateBuilder(args);b.Services.AddSingleton<IMy, My>();var app = b.Build();
Scopes: Singleton (app lifetime), Scoped (per-request), Transient (each resolve).