예제 #1
0
        public Context CreateDbContext(string[] args)
        {
            var config           = JsonConfigLib.GetConfiguration();
            var connectionString = config.GetConnectionString("MainDbConnection");

            return(new Context(connectionString));
        }
예제 #2
0
        static Logger()
        {
            var config = JsonConfigLib.GetConfiguration();

            Serilog.Log.Logger = new LoggerConfiguration()
                                 .ReadFrom.Configuration(config)
                                 .CreateLogger();
        }
예제 #3
0
        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));
        }