public Context CreateDbContext(string[] args) { var config = JsonConfigLib.GetConfiguration(); var connectionString = config.GetConnectionString("MainDbConnection"); return(new Context(connectionString)); }
static Logger() { var config = JsonConfigLib.GetConfiguration(); Serilog.Log.Logger = new LoggerConfiguration() .ReadFrom.Configuration(config) .CreateLogger(); }
public Context CreateDbContext(string[] args) { var path = @"D:\\Git\\PropertyValuationSystem\\src\\DddTestApi"; //var hh= Directory.Exists(path); //Console.WriteLine(hh.ToString()); var config = JsonConfigLib.GetConfiguration(path); var connectionString = config.GetConnectionString("DigestsSubDomainDbConnectionUseNpgsql"); Console.WriteLine($"path= {path} connectionString= {connectionString}"); return(new Context(connectionString)); }