J'ai besoin de vérifier dans la ConfigureServicesméthode si le nom actuel de l'environnement d'hébergement est «Développement».
Donc, utiliser la IHostingEnvironment.IsDevelopment()méthode peut me convenir, mais contrairement à la méthode Configure, je ne l'ai pas IHostingEnvironment env.