예제 #1
0
        /// <summary>
        /// Constructor for public access, creates a connection without an existing PCR-ID
        /// </summary>
        /// <param name="databaseId">DatabaseId to connect to</param>
        public BaseRepository(string databaseId)
        {
            if (Convert.ToBoolean(ConfigurationManager.AppSettings["IsNon_PCRDB"]) == true)
            {
                _masterDbContext = new UMSContext(ConnectionTools.GetMasterConnection());

                GetConnection(databaseId);
            }
            else
            {
                _connectionInfo  = ConnectionTools.GetOnboardingDbConnection(databaseId);
                _masterDbContext = new UMSContext(_connectionInfo.MasterDBConnection);
                _clientDbContext = new UMSContext(_connectionInfo.ClientDBConnection);
            }
        }