@@ -199,7 +199,7 @@ private static IQueryable<TSource> CallGenericWhereContainsMethod<TSource>(IQuer
199199 MemberExpression member ;
200200 if ( filter . IsAttributeOfRelationship )
201201 {
202- var relation = Expression . PropertyOrField ( entity , filter . Relationship . InternalRelationshipName ) ;
202+ var relation = Expression . PropertyOrField ( entity , filter . Relationship . PropertyInfo . Name ) ;
203203 member = Expression . Property ( relation , filter . Attribute . PropertyInfo . Name ) ;
204204 }
205205 else
@@ -263,16 +263,16 @@ private static IQueryable<TSource> CallGenericWhereMethod<TSource>(IQueryable<TS
263263 // Is relationship attribute
264264 if ( filter . IsAttributeOfRelationship )
265265 {
266- var relationProperty = concreteType . GetProperty ( filter . Relationship . InternalRelationshipName ) ;
266+ var relationProperty = concreteType . GetProperty ( filter . Relationship . PropertyInfo . Name ) ;
267267 if ( relationProperty == null )
268- throw new ArgumentException ( $ "'{ filter . Relationship . InternalRelationshipName } ' is not a valid relationship of '{ concreteType } '") ;
268+ throw new ArgumentException ( $ "'{ filter . Relationship . PropertyInfo . Name } ' is not a valid relationship of '{ concreteType } '") ;
269269
270270 var relatedType = filter . Relationship . RightType ;
271271 property = relatedType . GetProperty ( filter . Attribute . PropertyInfo . Name ) ;
272272 if ( property == null )
273- throw new ArgumentException ( $ "'{ filter . Attribute . PropertyInfo . Name } ' is not a valid attribute of '{ filter . Relationship . InternalRelationshipName } '") ;
273+ throw new ArgumentException ( $ "'{ filter . Attribute . PropertyInfo . Name } ' is not a valid attribute of '{ filter . Relationship . PropertyInfo . Name } '") ;
274274
275- var leftRelationship = Expression . PropertyOrField ( parameter , filter . Relationship . InternalRelationshipName ) ;
275+ var leftRelationship = Expression . PropertyOrField ( parameter , filter . Relationship . PropertyInfo . Name ) ;
276276 // {model.Relationship}
277277 left = Expression . PropertyOrField ( leftRelationship , property . Name ) ;
278278 }
0 commit comments