public TPaySecupayManager(TPaySecupayConfig config) { Config = config; Context = new PaySecupayContext(config.ConnectionString, config.Username); if (EventLog.Exists("pay.secupay")) EventLog.CreateEventSource("Application", "pay.secupay"); }
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"); }