示例#1
0
 public static string GetAuroraConnectionString()
 {
     if (currentAurora_CS == "")
     {
         string rawCS           = GetSecret("aurora_static");
         DB_CS  currentCSObject = JsonConvert.DeserializeObject <DB_CS>(rawCS);
         currentAurora_CS = $"Data Source={currentCSObject.host};port={currentCSObject.port};User ID={currentCSObject.username};Password={currentCSObject.password};";
     }
     return(currentAurora_CS);
 }
示例#2
0
 public static string GetMSSQLConnectionString()
 {
     if (currentMSSQL_CS == "")
     {
         DB_CS currentCSObject = new DB_CS();
         currentCSObject.host     = "{server address}";
         currentCSObject.username = "******";
         currentCSObject.password = "******";
         currentMSSQL_CS          = $"Data Source={currentCSObject.host};User ID={currentCSObject.username};Password={currentCSObject.password}";
     }
     return(currentMSSQL_CS);
 }