Ejemplo n.º 1
0
 static SqlServerSettings()
 {
     string settingFile = GetSettingFile();
     if (File.Exists(settingFile))
     {
         instance = DataContractSerializationHelper.Deserialize<SqlServerSettings>(settingFile);
     }
     else
     {
         instance = new SqlServerSettings()
         {
             SharingDatabaseConnectionString = "Server=.\\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;",
             Connections = new[] { new ConnectionSetting() { Name = "Sample", ConnectionString = "Server=.\\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;" } }
         };
         instance.Save();
     }
 }
Ejemplo n.º 2
0
        static SqlServerSettings()
        {
            string settingFile = GetSettingFile();

            if (File.Exists(settingFile))
            {
                instance = DataContractSerializationHelper.Deserialize <SqlServerSettings>(settingFile);
            }
            else
            {
                instance = new SqlServerSettings()
                {
                    SharingDatabaseConnectionString = "Server=.\\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;",
                    Connections = new[] { new ConnectionSetting()
                                          {
                                              Name = "Sample", ConnectionString = "Server=.\\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;"
                                          } }
                };
                instance.Save();
            }
        }