mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 18:52:50 +08:00
- 优化 表达式树解析为 NULL 的提示;
This commit is contained in:
parent
c6e7b55149
commit
0f5116d0d6
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user