public IEnumerable<QuerySortEnum> GetAllowedSortValues()
{
Type type = GetType();
PropertyInfo prop = type.GetProperty("Sort");
AllowedSortValuesAttribute attribute = prop.GetCustomAttribute<AllowedSortValuesAttribute>();
if (attribute == null)
{
return Enumerable.Empty<QuerySortEnum>();
}
return attribute.Values;
}