Esempio n. 1
0
        public XmlReader ExecuteXmlReader(DbCommand command, DbTransaction transaction)
        {
            SqlCommand sqlCommand = SqlDatabase.CheckIfSqlCommand(command);

            Database.PrepareCommand((DbCommand)sqlCommand, transaction);
            return(this.DoExecuteXmlReader(sqlCommand));
        }
Esempio n. 2
0
        public XmlReader ExecuteXmlReader(DbCommand command)
        {
            SqlCommand sqlCommand = SqlDatabase.CheckIfSqlCommand(command);

            using (DatabaseConnectionWrapper openConnection = this.GetOpenConnection())
            {
                Database.PrepareCommand(command, openConnection.Connection);
                return((XmlReader) new RefCountingXmlReader(openConnection, this.DoExecuteXmlReader(sqlCommand)));
            }
        }