mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 优化 表达式树解析为 NULL 的提示;
This commit is contained in:
		@@ -1724,6 +1724,7 @@ namespace FreeSql.Internal
 | 
				
			|||||||
                            }
 | 
					                            }
 | 
				
			||||||
                            while (expStack.Any())
 | 
					                            while (expStack.Any())
 | 
				
			||||||
                            {
 | 
					                            {
 | 
				
			||||||
 | 
					                                if (firstValue == null) throw new Exception(CoreStrings.Cannot_Be_NULL_Name(exp));
 | 
				
			||||||
                                var expStackItem = expStack.Pop() as MemberExpression;
 | 
					                                var expStackItem = expStack.Pop() as MemberExpression;
 | 
				
			||||||
                                if (expStackItem.Member.MemberType == MemberTypes.Property)
 | 
					                                if (expStackItem.Member.MemberType == MemberTypes.Property)
 | 
				
			||||||
                                    firstValue = ((PropertyInfo)expStackItem.Member).GetValue(firstValue, null);
 | 
					                                    firstValue = ((PropertyInfo)expStackItem.Member).GetValue(firstValue, null);
 | 
				
			||||||
@@ -2077,6 +2078,7 @@ namespace FreeSql.Internal
 | 
				
			|||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    while (expStack.Any())
 | 
					                    while (expStack.Any())
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
 | 
					                        if (firstValue == null) throw new Exception(CoreStrings.Cannot_Be_NULL_Name(exp));
 | 
				
			||||||
                        var expStackItem = expStack.Pop() as MemberExpression;
 | 
					                        var expStackItem = expStack.Pop() as MemberExpression;
 | 
				
			||||||
                        if (expStackItem.Member.MemberType == MemberTypes.Property)
 | 
					                        if (expStackItem.Member.MemberType == MemberTypes.Property)
 | 
				
			||||||
                            firstValue = ((PropertyInfo)expStackItem.Member).GetValue(firstValue, null);
 | 
					                            firstValue = ((PropertyInfo)expStackItem.Member).GetValue(firstValue, null);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user