Inheritance: DbCommandWrapper
Exemple #1
0
        public MarsDataReader(MarsDbCommand command, IDataReader inner)
            : base(inner)
        {
            command.context.currentReader = this;

            this.command = command;
        }
Exemple #2
0
		public MarsDataReader(MarsDbCommand command, IDataReader inner)
			: base(inner)
		{
			command.context.currentReader = this;

			this.command = command;
		}
        public virtual IDbCommand CreateCommand(SqlCreateCommandOptions options)
        {
            var retval = this.DbConnection.CreateCommand();

            retval.Transaction = this.dbTransaction;

            if (this.SqlDatabaseContext.CommandTimeout != null)
            {
                retval.CommandTimeout = (int)this.SqlDatabaseContext.CommandTimeout.Value.TotalMilliseconds;
            }

            if (this.emulateMultipleActiveResultSets)
            {
                retval = new MarsDbCommand(this, retval);
            }

            return(retval);
        }
		public virtual IDbCommand CreateCommand(SqlCreateCommandOptions options)
		{
			var retval = this.DbConnection.CreateCommand();

			 retval.Transaction = this.dbTransaction;

			if (this.SqlDatabaseContext.CommandTimeout != null)
			{
				retval.CommandTimeout = (int)this.SqlDatabaseContext.CommandTimeout.Value.TotalMilliseconds;
			}

			if (this.emulateMultipleActiveResultSets)
			{
				retval = new MarsDbCommand(this, retval);
			}

			return retval;
		}