Exemplo n.º 1
0
 /// <summary>
 /// 结束命令
 /// </summary>
 /// <param name="suppressTransaction">事务抑制</param>
 /// <returns></returns>
 public override MigrationCommandListBuilder EndCommand(bool suppressTransaction = false)
 {
     if (_commandBuilder.GetLength() != 0)
     {
         _commands.Add(new OracleMigrationCommand(_commandBuilder.Build(), suppressTransaction));
         _commandBuilder = _commandBuilderFactory.Create();
     }
     return(this);
 }
        public virtual RelationalCommandListBuilder EndCommand()
        {
            if (_commandBuilder.GetLength() != 0)
            {
                _commands.Add(_commandBuilder.Build());
                _commandBuilder = _commandBuilderFactory.Create();
            }

            return(this);
        }
        /// <summary>
        ///     Ends the building of the current command and adds it to the list of built commands.
        ///     The next call to one of the builder methods will start building a new command.
        /// </summary>
        /// <param name="suppressTransaction">
        ///     Indicates whether or not transactions should be suppressed while executing the built command.
        /// </param>
        /// <returns> This builder so that additional calls can be chained. </returns>
        public virtual MigrationCommandListBuilder EndCommand(bool suppressTransaction = false)
        {
            if (_commandBuilder.GetLength() != 0)
            {
                _commands.Add(new MigrationCommand(_commandBuilder.Build(), suppressTransaction));
                _commandBuilder = _dependencies.CommandBuilderFactory.Create(_dependencies.Logger);
            }

            return(this);
        }