public static Result <T> GetSelectValue <T>(string connectionString, string query, List <MySqlParameter> parameters = null)
        {
            var valor = default(T);

            using (var exe = new DataBaseExecuteReader(connectionString, query, parameters))
            {
                if (exe.DataReader.Read())
                {
                    if (typeof(T) == typeof(int))
                    {
                        valor = (T)(object)exe.DataReader.GetInt(0);
                    }
                    else if (typeof(T) == typeof(double))
                    {
                        valor = (T)(object)exe.DataReader.GetDecimal(0);
                    }
                    else
                    {
                        valor = (T)(object)exe.DataReader.GetString(0);
                    }
                }
                else
                {
                    return(Result.Failure <T>("Record not found"));
                }
            }
            return(valor);
        }
        public static ulong GetLastInsertId(string connectionString)
        {
            var query = "SELECT LAST_INSERT_ID()";

            using (var exe = new DataBaseExecuteReader(connectionString, query))
            {
                if (exe.DataReader.Read())
                {
                    return(exe.DataReader.GetULong(0));
                }
            }
            return(0);
        }