Compare Page Revisions
« Older Revision - Back to Page History - Newer Revision »
public static class ConfigurationExtensions { public static TConfig MapConfigSection<TConfig>(this IServiceCollection services, IConfiguration config, string name) where TConfig: class { var settings = config.GetSection(name).Get<TConfig>(); services.AddSingleton(settings); return settings; } }
services.MapConfigSection<PowerBISettings>(config, "PowerBI");
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.