Ejemplo n.º 1
0
        protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior)
        {
            IDataReader reader;

            if (CommandText.StartsWith("insert", true, CultureInfo.InvariantCulture))
            {
                return(null);
            }

            if (DbTransaction == null)
            {
                reader = this.dataAction.ExecuteDataReaderParametrized(
                    CommandText, CommandType, this.parameters, behavior);
            }
            else
            {
                reader = this.dataAction.ExecuteDataReaderParametrized(
                    CommandText, CommandType, this.parameters, behavior, this.transaction.TransactionName);
            }

            return(new AptifyDataReader(reader));
        }
Ejemplo n.º 2
0
 private void VerificarSeEhTabelaDeValidacaoDeExistencia()
 {
     VerificacaoDeExistencia = (CommandText?.StartsWith("select top 1 1 from") == true);
 }
Ejemplo n.º 3
0
 private bool EhConsultaRelacionada()
 {
     return((CommandText.StartsWith("asc|")) ||
            (CommandText.StartsWith("desc|")));
 }