/// <summary> /// Query the database for a single column of data and return as a list of the supplied type. /// </summary> /// <typeparam name="T">The data return type.</typeparam> /// <param name="EstablishedConnection">An open and established connection to a MySQL database.</param> /// <param name="QueryString">The full SQL query string to be used to retrieve the value requested.</param> /// <param name="Parameters">Named parameters for the query.</param> /// <param name="ThrowException">Throw exception or cache in LastExecutionException and continue.</param> /// <param name="SqlTransaction">Supply an existing transaction for use in this operation.</param> /// <returns>A list of data as the specified return type.</returns> public static IEnumerable <T> GetDataList <T>(MySqlConnection EstablishedConnection, string QueryString, Dictionary <string, object> Parameters = null, bool ThrowException = true, MySqlTransaction SqlTransaction = null) //where T : DALBaseModel => ObjectResultsHelper.GetDataList <T>(EstablishedConnection, QueryString, Parameters: Parameters, ThrowException: ThrowException, SqlTransaction: SqlTransaction);
/// <summary> /// Query the database for a single column of data and return as a list of the supplied type. /// </summary> /// <typeparam name="T">The data return type.</typeparam> /// <param name="ConfigConnectionString">An enum type to reference a connection string defined in web.config.</param> /// <param name="QueryString">The full SQL query string to be used to retrieve the value requested.</param> /// <param name="Parameters">Named parameters for the query.</param> /// <param name="ThrowException">Throw exception or cache in LastExecutionException and continue.</param> /// <param name="AllowUserVariables">Will allow special user variables (variables start with "@") to be defined in the query that will be eventually executed.</param> /// <returns>A list of data as the specified return type.</returns> public static IEnumerable <T> GetDataList <T>(Enum ConfigConnectionString, string QueryString, Dictionary <string, object> Parameters = null, bool ThrowException = true, bool AllowUserVariables = false) //where T : DALBaseModel => ObjectResultsHelper.GetDataList <T>(ConfigConnectionString, QueryString, Parameters: Parameters, ThrowException: ThrowException, AllowUserVariables: AllowUserVariables);