示例#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));
        }