Ejemplo n.º 1
0
        public void Install()
        {
            DatabaseManager.SetDbInitializer(new CreateOrUpdateTables <DatabaseContext>());

            //run the migrator to install the database
            var migrator = new mobSocialDbMigrator(new Data.Migrations.Configuration());

            migrator.Update();
        }
Ejemplo n.º 2
0
        public void Install(string connectionString, string providerName)
        {
            DatabaseManager.SetDbInitializer(new CreateOrUpdateTables <DatabaseContext>());

            //run the migrator to install the database
            var migrator = new mobSocialDbMigrator(new Data.Migrations.Configuration(connectionString, providerName));

            migrator.Update();
        }
Ejemplo n.º 3
0
        public void Run()
        {
            if (!DatabaseManager.IsDatabaseInstalled())
            {
                return;
            }

            //set db context to null to avoid any errors
            DatabaseManager.SetDbInitializer <DatabaseContext>(null);

            //run the migrator. this will update any pending tasks or updates to database
            var migrator = new mobSocialDbMigrator(new Data.Migrations.Configuration());

            migrator.Update();
        }