File tree Expand file tree Collapse file tree
src/MongoFramework/Infrastructure/Querying Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,11 +147,11 @@ public static BsonString GetFieldName(Expression expression)
147147
148148 while ( true )
149149 {
150- if ( currentExpression is BinaryExpression binaryExpression && expression . NodeType == ExpressionType . ArrayIndex )
150+ if ( currentExpression is BinaryExpression binaryExpression && currentExpression . NodeType == ExpressionType . ArrayIndex )
151151 {
152152 //The index is on the right
153153 var arrayIndex = TranslateSubExpression ( binaryExpression . Right ) ;
154- partialNamePieces . Push ( arrayIndex . AsString ) ;
154+ partialNamePieces . Push ( arrayIndex . ToString ( ) ) ;
155155
156156 //The parent expression is on the left
157157 currentExpression = binaryExpression . Left ;
@@ -169,7 +169,7 @@ public static BsonString GetFieldName(Expression expression)
169169 }
170170 else
171171 {
172- throw new ArgumentException ( $ "Unexpected node type { expression . NodeType } .") ;
172+ throw new ArgumentException ( $ "Unexpected node type { currentExpression . NodeType } .") ;
173173 }
174174 }
175175 }
You can’t perform that action at this time.
0 commit comments