Beispiel #1
0
        public ControlledQueryStatement(DbConnection cnx, string sql, params object[] args)
        {
            _cmd = cnx.CreateCommand();
            var statment = new PrepareStatement(cnx.GetProvider(), sql, args);

            statment.Setup(Command);
        }
Beispiel #2
0
        public static DbCommand CreateAndSetupCommand(this DbConnection cnx, string sql, params object[] args)
        {
            var provider  = cnx.GetProvider();
            var cmd       = cnx.CreateCommand();
            var statement = new PrepareStatement(provider, sql, args);

            statement.Setup(cmd);
            return(cmd);
        }