public ControlledQueryStatement(DbConnection cnx, string sql, params object[] args) { _cmd = cnx.CreateCommand(); var statment = new PrepareStatement(cnx.GetProvider(), sql, args); statment.Setup(Command); }
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); }