@@ -13,7 +13,7 @@ public interface IResourceDefinition
13
13
List < AttrAttribute > GetAllowedAttributes ( ) ;
14
14
List < RelationshipAttribute > GetAllowedRelationships ( ) ;
15
15
object GetCustomQueryFilter ( string key ) ;
16
- List < ( AttrAttribute , SortDirection ) > DefaultSort ( ) ;
16
+ List < ( AttrAttribute Attribute , SortDirection SortDirection ) > DefaultSort ( ) ;
17
17
}
18
18
19
19
/// <summary>
@@ -146,14 +146,16 @@ public sealed class QueryFilters : Dictionary<string, Func<IQueryable<TResource>
146
146
/// </example>
147
147
public virtual PropertySortOrder GetDefaultSortOrder ( ) => null ;
148
148
149
- public List < ( AttrAttribute , SortDirection ) > DefaultSort ( )
149
+ public List < ( AttrAttribute Attribute , SortDirection SortDirection ) > DefaultSort ( )
150
150
{
151
151
var defaultSortOrder = GetDefaultSortOrder ( ) ;
152
152
if ( defaultSortOrder != null && defaultSortOrder . Count > 0 )
153
153
{
154
- var order = new List < ( AttrAttribute , SortDirection ) > ( ) ;
154
+ var order = new List < ( AttrAttribute Attribute , SortDirection SortDirection ) > ( ) ;
155
155
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
+ }
157
159
158
160
return order ;
159
161
}
@@ -166,6 +168,6 @@ public sealed class QueryFilters : Dictionary<string, Func<IQueryable<TResource>
166
168
/// method signature.
167
169
/// See <see cref="GetQueryFilters" /> for usage details.
168
170
/// </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 ) > { }
170
172
}
171
173
}
0 commit comments