예제 #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");
 }
예제 #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");
        }