Esempio n. 1
0
 static SiteEntitySetting()
 {
     string settingFile = GetSettingFile();
     if (File.Exists(settingFile))
     {
         instance = DataContractSerializationHelper.Deserialize<SiteEntitySetting>(settingFile);
     }
     else
     {
         instance = new SiteEntitySetting()
         {
             ConnectionString = "Server=.\\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;",
             ProviderInvariantName = "System.Data.SqlClient",
             ProviderManifestToken = "2008"
         };
         Save(instance);
     }
 }
Esempio n. 2
0
        static SiteEntitySetting()
        {
            string settingFile = GetSettingFile();

            if (File.Exists(settingFile))
            {
                instance = DataContractSerializationHelper.Deserialize <SiteEntitySetting>(settingFile);
            }
            else
            {
                instance = new SiteEntitySetting()
                {
                    ConnectionString      = "Server=.\\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;",
                    ProviderInvariantName = "System.Data.SqlClient",
                    ProviderManifestToken = "2008"
                };
                Save(instance);
            }
        }
Esempio n. 3
0
        public static void Save(SiteEntitySetting instance)
        {
            string settingFile = GetSettingFile();

            DataContractSerializationHelper.Serialize(instance, settingFile);
        }
Esempio n. 4
0
 public static void Save(SiteEntitySetting instance)
 {
     string settingFile = GetSettingFile();
     DataContractSerializationHelper.Serialize(instance, settingFile);
 }