Esempio n. 1
0
        /// <summary>
        /// <para>Executes the <see cref="SqlCommandWrapper"/> in a transaction and returns an <see cref="XmlReader"/>.</para>
        /// </summary>
        /// <param name="command">
        /// <para>The <see cref="SqlCommandWrapper"/> to execute.</para>
        /// </param>
        /// <param name="transaction">
        /// <para>The <see cref="IDbTransaction"/> to execute the command within.</para>
        /// </param>
        /// <returns>
        /// <para>An <see cref="XmlReader"/> object.</para>
        /// </returns>
        public XmlReader ExecuteXmlReader(SqlCommandWrapper command, IDbTransaction transaction)
        {
            PrepareCommand(command, transaction);

            SqlCommand sqlCommand = command.Command as SqlCommand;

            return(DoExecuteXmlReader(sqlCommand));
        }
Esempio n. 2
0
        /// <summary>
        /// <para>Executes the <see cref="SqlCommandWrapper"/> and returns an <see cref="XmlReader"/>.</para>
        /// </summary>
        /// <param name="command">
        /// <para>The <see cref="SqlCommandWrapper"/> to execute.</para>
        /// </param>
        /// <returns>
        /// <para>An <see cref="XmlReader"/> object.</para>
        /// </returns>
        public XmlReader ExecuteXmlReader(SqlCommandWrapper command)
        {
            IDbConnection connection = OpenConnection();

            PrepareCommand(command, connection);
            SqlCommand sqlCommand = command.Command as SqlCommand;

            return(DoExecuteXmlReader(sqlCommand));
        }