public override int Go()
 {
     if (string.IsNullOrWhiteSpace(Sql))
     {
         throw new MissingSqlException();
     }
     return(StatementExecutor.ExecuteNonQuery(Sql));
 }
 public override int Go()
 {
     if (paramSetMode)
     {
         throw new InvalidOperationException("For cannot be used ParamSet have been used, please create a new command.");
     }
     return(StatementExecutor.ExecuteNonQuery(Sql()));
 }
Esempio n. 3
0
        public override TEntity Go()
        {
            if (paramWithMode)
            {
                throw new InvalidOperationException("For cannot be used ParamWith have been used, please create a new command.");
            }
            if (IsAutoIncrement)
            {
                using (IDataReader reader = StatementExecutor.ExecuteReader(Sql()))
                    return(EntityMapper.Map <TEntity>(reader).FirstOrDefault());
            }

            StatementExecutor.ExecuteNonQuery(Sql());
            return(entity);
        }
 public override int Go()
 {
     return(StatementExecutor.ExecuteNonQuery(Sql()));
 }
 public override int Go()
 {
     var(item1, item2) = ParamSqlWithEntity();
     return(StatementExecutor.ExecuteNonQuery(item1, item2));
 }