Esempio n. 1
0
 public TPaySecupayManager(TPaySecupayConfig config)
 {
     Config = config;
     Context = new PaySecupayContext(config.ConnectionString, config.Username);
     if (EventLog.Exists("pay.secupay")) EventLog.CreateEventSource("Application", "pay.secupay");
 }
Esempio n. 2
0
        public void TestCreateDb()
        {
            TPaySecupayConfig config = TPaySecupayConfig.LoadFromFile(ConfigFileName);

            var context = new PaySecupayContext(config.ConnectionString, config.Username);
            string dbCreationScript = ((IObjectContextAdapter) context).ObjectContext.CreateDatabaseScript();
            File.WriteAllText("secupay-db-create.sql", dbCreationScript);
            Process.Start("secupay-db-create.sql");
        }