static StorageContextConfiguration() { _defaultConfig = new StorageContextConfigurationEntity { #if DEBUG StorageContexts = new Dictionary<string, StorageContextConfigurationItem> { {Constants.DefaultContextName, new StorageContextConfigurationItem { Name = Constants.DefaultContextName, ProviderName = "System.Data.SqlClient", ConnectionString = "Server=.;Database=Adhesive;User ID=sa;Password=WQW3s2iWVUDrApTsEMktgg==;Trusted_Connection=False;Persist Security Info=True", //ConnectionString = "Server=.;Database=Adhesive;User ID=sa;Password=DLdNa9R+IFkkHxvWszyLHw==;Trusted_Connection=False;Persist Security Info=True", }} } #else StorageContexts = new Dictionary<string, StorageContextConfigurationItem> { {Constants.DefaultContextName, new StorageContextConfigurationItem { Name = Constants.DefaultContextName, ProviderName = "System.Data.SqlClient", ConnectionString = "Server=.;Database=Adhesive;User ID=sa;Password=WQW3s2iWVUDrApTsEMktgg==;Trusted_Connection=False;Persist Security Info=True", //ConnectionString = "Server=192.168.1.75;Database=Adhesive;User ID=Aic_User;Password=9djGOh3dP5AxjRixWicFUw==;Trusted_Connection=False;Persist Security Info=True", }}, { "AlarmDbContext", new StorageContextConfigurationItem { Name = "AlarmDbContext", ProviderName = "System.Data.SqlClient", ConnectionString = "Server=.;Database=Adhesive;User ID=sa;Password=WQW3s2iWVUDrApTsEMktgg==;Trusted_Connection=False;Persist Security Info=True", //ConnectionString = "Server=192.168.1.75;Database=Adhesive;User ID=Aic_User;Password=9djGOh3dP5AxjRixWicFUw==;Trusted_Connection=False;Persist Security Info=True", }}, } #endif }; _storageContextConfig = _configService.GetConfigItemValue(true, "StorageConfig", _defaultConfig); foreach (var sc in _storageContextConfig.StorageContexts) { _storageContextsCache[sc.Key] = sc.Value; } }
static StorageContextConfiguration() { _defaultConfig = new StorageContextConfigurationEntity { #if DEBUG StorageContexts = new Dictionary <string, StorageContextConfigurationItem> { { Constants.DefaultContextName, new StorageContextConfigurationItem { Name = Constants.DefaultContextName, ProviderName = "System.Data.SqlClient", ConnectionString = "Server=.;Database=Adhesive;User ID=sa;Password=DLdNa9R+IFkkHxvWszyLHw==;Trusted_Connection=False;Persist Security Info=True", } } } #else StorageContexts = new Dictionary <string, StorageContextConfigurationItem> { { Constants.DefaultContextName, new StorageContextConfigurationItem { Name = Constants.DefaultContextName, ProviderName = "System.Data.SqlClient", ConnectionString = "Server=192.168.1.75;Database=Adhesive;User ID=Aic_User;Password=9djGOh3dP5AxjRixWicFUw==;Trusted_Connection=False;Persist Security Info=True", } }, { "AlarmDbContext", new StorageContextConfigurationItem { Name = "AlarmDbContext", ProviderName = "System.Data.SqlClient", ConnectionString = "Server=192.168.1.75;Database=Adhesive;User ID=Aic_User;Password=9djGOh3dP5AxjRixWicFUw==;Trusted_Connection=False;Persist Security Info=True", } }, } #endif }; _storageContextConfig = _configService.GetConfigItemValue(true, "StorageConfig", _defaultConfig); foreach (var sc in _storageContextConfig.StorageContexts) { _storageContextsCache[sc.Key] = sc.Value; } }