Or this even, so it can be used on more than just the SortDirection enum

        public static string ToParameter<T>(this T prop)
        {
            if (prop == null) return null;

            var member = prop.GetType().GetMember(prop.ToString()).FirstOrDefault();
            if (member == null) return null;

            var attribute = member.GetCustomAttributes(typeof(ParameterAttribute), false)
                .Cast<ParameterAttribute>()
                .FirstOrDefault();

            return attribute != null ? attribute.Value : null;
        }