@@ -43,6 +43,7 @@ private SortExpression CreateSortFromExpressionSyntax()
4343 {
4444 AttrAttribute paintColorAttribute = ResourceGraph . GetResourceType < ChromeWheel > ( ) . GetAttributeByPropertyName ( nameof ( ChromeWheel . PaintColor ) ) ;
4545 AttrAttribute hasTubeAttribute = ResourceGraph . GetResourceType < CarbonWheel > ( ) . GetAttributeByPropertyName ( nameof ( CarbonWheel . HasTube ) ) ;
46+ AttrAttribute idAttribute = ResourceGraph . GetResourceType < Wheel > ( ) . GetAttributeByPropertyName ( nameof ( Wheel . Id ) ) ;
4647
4748 var cylinderCountChain = new ResourceFieldChainExpression ( ImmutableArray . Create < ResourceFieldAttribute > (
4849 ResourceGraph . GetResourceType < Wheel > ( ) . GetRelationshipByPropertyName ( nameof ( Wheel . Vehicle ) ) ,
@@ -53,7 +54,8 @@ private SortExpression CreateSortFromExpressionSyntax()
5354 {
5455 new SortElementExpression ( new ResourceFieldChainExpression ( paintColorAttribute ) , true ) ,
5556 new SortElementExpression ( new ResourceFieldChainExpression ( hasTubeAttribute ) , false ) ,
56- new SortElementExpression ( new CountExpression ( cylinderCountChain ) , true )
57+ new SortElementExpression ( new CountExpression ( cylinderCountChain ) , true ) ,
58+ new SortElementExpression ( new ResourceFieldChainExpression ( idAttribute ) , true )
5759 } . ToImmutableArray ( ) ) ;
5860 }
5961
@@ -63,7 +65,8 @@ private SortExpression CreateSortFromLambdaSyntax()
6365 {
6466 ( wheel => ( wheel as ChromeWheel ) ! . PaintColor , ListSortDirection . Ascending ) ,
6567 ( wheel => ( ( CarbonWheel ) wheel ) . HasTube , ListSortDirection . Descending ) ,
66- ( wheel => ( ( GasolineEngine ) ( ( Car ) wheel . Vehicle ! ) . Engine ) . Cylinders . Count , ListSortDirection . Ascending )
68+ ( wheel => ( ( GasolineEngine ) ( ( Car ) wheel . Vehicle ! ) . Engine ) . Cylinders . Count , ListSortDirection . Ascending ) ,
69+ ( wheel => wheel . Id , ListSortDirection . Ascending )
6770 } ) ;
6871 }
6972}
0 commit comments