Пример #1
0
        private void EnableMigrations(string[] args)
        {
            var criteriaParmas = ParseParams(args);

            var criteria = new EnableMigrationsCriteria
            {
                ProjectPath    = criteriaParmas.ProjectPath,
                RepoName       = criteriaParmas.OptionalRepoName,
                ConfigFilePath = criteriaParmas.ConfigFilePath,
            };

            var setup = new SchemaSetup();

            setup.EnableMigrations(criteria);
        }
Пример #2
0
        private void Run()
        {
            CopyDllsForDomainLoadingDebug(@"D:\Development\NHibernateRepoProject\Test\ExampleRepo\bin\debug");

            LoggerBase.IsDebugging = true;
            var setup = new SchemaSetup();

            setup.EnableMigrations(new EnableMigrationsCriteria
            {
                ProjectPath    = @"D:\Development\NHibernateRepoProject\Test\ExampleRepo\examplerepo.csproj",
                RepoName       = "SessionRepo",
                ConfigFilePath = @"D:\Development\NHibernateRepoProject\Test\ExampleRepo\App.config",
            });



//            var criteria = new CreationCriteria
//            {
//                ProjectFileLocation = @"D:\Development\NHibernateRepoProject\Test\ExampleRepo\ExampleRepo.csproj",
//                FileName = "initial_Setup-Models",
//                RepoName = "examplerepo",
//                ConfigFilePath = @"D:\Development\NHibernateRepoProject\Test\ExampleRepo\App.config"
//            };
//            setup.CreateScript(criteria);


//            var criteria = new CreationCriteria
//            {
//                ProjectFileLocation = @"D:\Development\NHibernateRepoProject\Test\ExampleRepo\ExampleRepo.csproj",
//                FileName = "Age_added",
//                RepoName = "ExampleRepo",
//                ConfigFilePath = @"D:\Development\NHibernateRepoProject\Test\ExampleRepo\App.config"
//            };
//            setup.CreateScript(criteria);



//                var crit = new ApplyMigrationCriteria
//                {
//                    ProjectPath = @"D:\Development\NHibernateRepoProject\Test\ExampleRepo\ExampleRepo.csproj",
//                    RepoName = "ExampleRepo",
//                    ConfigFilePath = @"D:\Development\NHibernateRepoProject\Test\ExampleRepo\App.config"
//                };
//
//                setup.ApplyMigrations(crit);
        }