Ejemplo n.º 1
0
 protected override void OnStartup(StartupEventArgs e)
 {
     base.OnStartup(e);
     ApplicationThemeHelper.UpdateApplicationThemeName();
     DbEngineDetector.PatchConnectionStringsAndConfigureEntityFrameworkDefaultConnectionFactory();
     Database.SetInitializer <DepartmentContext>(new DepartmentContextInitializer());
 }
 protected override void OnStartup(StartupEventArgs e)
 {
     base.OnStartup(e);
     ApplicationThemeHelper.UpdateApplicationThemeName();
     DbEngineDetector.PatchConnectionStringsAndConfigureEntityFrameworkDefaultConnectionFactory();
     Database.SetInitializer <SchoolContext>(new SchoolContextInitializer());
     MetadataLocator.Default = MetadataLocator.Create().AddMetadata <SchoolContextMetadata>();
 }
Ejemplo n.º 3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            DbEngineDetector.PatchConnectionStringsAndConfigureEntityFrameworkDefaultConnectionFactory();
            Database.SetInitializer(new DiagramStorageInitializer());

            Application.Run(new Form1());
        }
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            ApplicationThemeHelper.UpdateApplicationThemeName();
            DbEngineDetector.PatchConnectionStringsAndConfigureEntityFrameworkDefaultConnectionFactory();

            //var deleteContext = new DevAVDb();
            //if(deleteContext.Database.Exists())
            //    deleteContext.Database.Delete();

            var context = new DevAVDb();

            if (!context.Database.Exists())
            {
                DXSplashScreen.Show <GenerateDBSplashScreen>();
                DXSplashScreen.SetState("Generating database...");
                try {
                    Database.SetInitializer <DevAVDb>(new DatabaseInitializer());
                    context.Customers.Count();
                } finally {
                    DXSplashScreen.Close();
                }
            }
        }
Ejemplo n.º 5
0
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     ApplicationThemeHelper.UpdateApplicationThemeName();
     DbEngineDetector.PatchConnectionStringsAndConfigureEntityFrameworkDefaultConnectionFactory();
 }
 protected override void OnStartup(StartupEventArgs e)
 {
     DbEngineDetector.PatchConnectionStringsAndConfigureEntityFrameworkDefaultConnectionFactory();
     Database.SetInitializer <SchedulingContext>(new SchedulingContextInitializer());
     base.OnStartup(e);
 }
Ejemplo n.º 7
0
 private void OnAppStartup_UpdateThemeName(object sender, StartupEventArgs e)
 {
     DevExpress.Xpf.Core.ApplicationThemeHelper.UpdateApplicationThemeName();
     DbEngineDetector.PatchConnectionStringsAndConfigureEntityFrameworkDefaultConnectionFactory();
     Database.SetInitializer(new DiagramStorageInitializer());
 }
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     ApplicationThemeHelper.UpdateApplicationThemeName();
     DbEngineDetector.PatchConnectionStringsAndConfigureEntityFrameworkDefaultConnectionFactory();
     Database.SetInitializer <DepartmentContext>(new DepartmentContextInitializer());
 }
 public App()
 {
     DbEngineDetector.PatchConnectionStringsAndConfigureEntityFrameworkDefaultConnectionFactory();
 }