예제 #1
0
        /// <summary>
        ///     Scaffolds a code-based migration to apply any pending model changes.
        /// </summary>
        /// <param name="migrationName"> The name for the generated migration. </param>
        /// <param name="language"> The programming language of the generated migration. </param>
        /// <param name="rootNamespace"> The root namespace of the project the migration will be added to. </param>
        /// <param name="ignoreChanges"> Whether or not to include model changes. </param>
        /// <returns> The scaffolded migration. </returns>
        public virtual ScaffoldedMigration Scaffold(
            string migrationName, string language, string rootNamespace, bool ignoreChanges)
        {
            var runner
                = new ScaffoldRunner
                {
                MigrationName = migrationName,
                Language      = language,
                RootNamespace = rootNamespace,
                IgnoreChanges = ignoreChanges
                };

            ConfigureRunner(runner);

            Run(runner);

            return((ScaffoldedMigration)_appDomain.GetData("result"));
        }
예제 #2
0
        /// <summary>
        /// Scaffolds a code-based migration to apply any pending model changes.
        /// </summary>
        /// <param name="migrationName"> The name for the generated migration. </param>
        /// <param name="language"> The programming language of the generated migration. </param>
        /// <param name="rootNamespace"> The root namespace of the project the migration will be added to. </param>
        /// <param name="ignoreChanges"> Whether or not to include model changes. </param>
        /// <returns> The scaffolded migration. </returns>
        public virtual ScaffoldedMigration Scaffold(
            string migrationName, string language, string rootNamespace, bool ignoreChanges)
        {
            var runner
                = new ScaffoldRunner
                    {
                        MigrationName = migrationName,
                        Language = language,
                        RootNamespace = rootNamespace,
                        IgnoreChanges = ignoreChanges
                    };
            ConfigureRunner(runner);

            Run(runner);

            return (ScaffoldedMigration)_appDomain.GetData("result");
        }