using Microsoft.Extensions.Configuration; using System.IO; namespace EC.Helper.Common { public class ConfigHelper { public static IConfiguration ReadConfiguration(string configPath) { ConfigurationBuilder builder = new(); if (!File.Exists(configPath)) { return null; } builder.AddJsonFile(configPath); return builder.Build(); } } }