@@ -65,7 +65,7 @@ public static IQueryable<TSource> Filter<TSource>(this IQueryable<TSource> sourc
6565 }
6666
6767 public static IQueryable < TSource > Select < TSource > ( this IQueryable < TSource > source , IEnumerable < AttrAttribute > columns )
68- => CallGenericSelectMethod ( source , columns . Select ( attr => attr . InternalAttributeName ) . ToList ( ) ) ;
68+ => CallGenericSelectMethod ( source , columns . Select ( attr => attr . PropertyInfo . Name ) . ToList ( ) ) ;
6969
7070 public static IOrderedQueryable < TSource > Sort < TSource > ( this IQueryable < TSource > source , SortQueryContext sortQuery )
7171 {
@@ -191,7 +191,7 @@ private static Expression GetFilterExpressionLambda(Expression left, Expression
191191 private static IQueryable < TSource > CallGenericWhereContainsMethod < TSource > ( IQueryable < TSource > source , FilterQueryContext filter )
192192 {
193193 var concreteType = typeof ( TSource ) ;
194- var property = concreteType . GetProperty ( filter . Attribute . InternalAttributeName ) ;
194+ var property = concreteType . GetProperty ( filter . Attribute . PropertyInfo . Name ) ;
195195
196196 try
197197 {
@@ -201,10 +201,10 @@ private static IQueryable<TSource> CallGenericWhereContainsMethod<TSource>(IQuer
201201 if ( filter . IsAttributeOfRelationship )
202202 {
203203 var relation = Expression . PropertyOrField ( entity , filter . Relationship . InternalRelationshipName ) ;
204- member = Expression . Property ( relation , filter . Attribute . InternalAttributeName ) ;
204+ member = Expression . Property ( relation , filter . Attribute . PropertyInfo . Name ) ;
205205 }
206206 else
207- member = Expression . Property ( entity , filter . Attribute . InternalAttributeName ) ;
207+ member = Expression . Property ( entity , filter . Attribute . PropertyInfo . Name ) ;
208208
209209 var method = ContainsMethod . MakeGenericMethod ( member . Type ) ;
210210 var obj = TypeHelper . ConvertListType ( propertyValues , member . Type ) ;
@@ -259,9 +259,9 @@ private static IQueryable<TSource> CallGenericWhereMethod<TSource>(IQueryable<TS
259259 throw new ArgumentException ( $ "'{ filter . Relationship . InternalRelationshipName } ' is not a valid relationship of '{ concreteType } '") ;
260260
261261 var relatedType = filter . Relationship . RightType ;
262- property = relatedType . GetProperty ( filter . Attribute . InternalAttributeName ) ;
262+ property = relatedType . GetProperty ( filter . Attribute . PropertyInfo . Name ) ;
263263 if ( property == null )
264- throw new ArgumentException ( $ "'{ filter . Attribute . InternalAttributeName } ' is not a valid attribute of '{ filter . Relationship . InternalRelationshipName } '") ;
264+ throw new ArgumentException ( $ "'{ filter . Attribute . PropertyInfo . Name } ' is not a valid attribute of '{ filter . Relationship . InternalRelationshipName } '") ;
265265
266266 var leftRelationship = Expression . PropertyOrField ( parameter , filter . Relationship . InternalRelationshipName ) ;
267267 // {model.Relationship}
@@ -270,9 +270,9 @@ private static IQueryable<TSource> CallGenericWhereMethod<TSource>(IQueryable<TS
270270 // Is standalone attribute
271271 else
272272 {
273- property = concreteType . GetProperty ( filter . Attribute . InternalAttributeName ) ;
273+ property = concreteType . GetProperty ( filter . Attribute . PropertyInfo . Name ) ;
274274 if ( property == null )
275- throw new ArgumentException ( $ "'{ filter . Attribute . InternalAttributeName } ' is not a valid property of '{ concreteType } '") ;
275+ throw new ArgumentException ( $ "'{ filter . Attribute . PropertyInfo . Name } ' is not a valid property of '{ concreteType } '") ;
276276
277277 // {model.Id}
278278 left = Expression . PropertyOrField ( parameter , property . Name ) ;
0 commit comments