Dynamically Change the ServiceLifetime of a Registered Service in .NET
O artigo mostra como substituir uma inscrição no IServiceCollection por outra com ServiceLifetime diferente, usando Replace e métodos de extensão para trocar implementação e ambiente.