@@ -13,7 +13,7 @@ public interface IResourceDefinition
1313 List < AttrAttribute > GetAllowedAttributes ( ) ;
1414 List < RelationshipAttribute > GetAllowedRelationships ( ) ;
1515 object GetCustomQueryFilter ( string key ) ;
16- List < ( AttrAttribute , SortDirection ) > DefaultSort ( ) ;
16+ List < ( AttrAttribute Attribute , SortDirection SortDirection ) > DefaultSort ( ) ;
1717 }
1818
1919 /// <summary>
@@ -146,14 +146,16 @@ public sealed class QueryFilters : Dictionary<string, Func<IQueryable<TResource>
146146 /// </example>
147147 public virtual PropertySortOrder GetDefaultSortOrder ( ) => null ;
148148
149- public List < ( AttrAttribute , SortDirection ) > DefaultSort ( )
149+ public List < ( AttrAttribute Attribute , SortDirection SortDirection ) > DefaultSort ( )
150150 {
151151 var defaultSortOrder = GetDefaultSortOrder ( ) ;
152152 if ( defaultSortOrder != null && defaultSortOrder . Count > 0 )
153153 {
154- var order = new List < ( AttrAttribute , SortDirection ) > ( ) ;
154+ var order = new List < ( AttrAttribute Attribute , SortDirection SortDirection ) > ( ) ;
155155 foreach ( var sortProp in defaultSortOrder )
156- order . Add ( ( _resourceGraph . GetAttributes ( sortProp . Item1 ) . Single ( ) , sortProp . Item2 ) ) ;
156+ {
157+ order . Add ( ( _resourceGraph . GetAttributes ( sortProp . Attribute ) . Single ( ) , sortProp . SortDirection ) ) ;
158+ }
157159
158160 return order ;
159161 }
@@ -166,6 +168,6 @@ public sealed class QueryFilters : Dictionary<string, Func<IQueryable<TResource>
166168 /// method signature.
167169 /// See <see cref="GetQueryFilters" /> for usage details.
168170 /// </summary>
169- public sealed class PropertySortOrder : List < ( Expression < Func < TResource , dynamic > > , SortDirection ) > { }
171+ public sealed class PropertySortOrder : List < ( Expression < Func < TResource , dynamic > > Attribute , SortDirection SortDirection ) > { }
170172 }
171173}
0 commit comments