public override IReadOnlyList <IRelationalCommand> Generate(IReadOnlyList <MigrationOperation> operations, IModel model = null)
        {
            Check.NotNull(operations, nameof(operations));

            var builder = new RelationalCommandListBuilder(_commandBuilderFactory);

            foreach (var operation in operations)
            {
                Generate(operation, model, builder);
                builder
                .EndCommand();
            }

            return(builder.GetCommands());
        }
Example #2
0
        public virtual IReadOnlyList <IRelationalCommand> Generate(
            IReadOnlyList <MigrationOperation> operations,
            IModel model = null)
        {
            Check.NotNull(operations, nameof(operations));

            var builder = new RelationalCommandListBuilder(_commandBuilderFactory);

            foreach (var operation in operations)
            {
                Generate(operation, model, builder);
                builder
                .AppendLine(SqlGenerator.BatchCommandSeparator)
                .EndCommand();
            }

            return(builder.GetCommands());
        }