- 优化 延时导航属性的错误提醒,当无法匹配错误,转到重写类 get 时抛出(实现延时导航属性,与普通导航一起使用);

This commit is contained in:
28810
2019-05-21 10:39:35 +08:00
parent 98d120120b
commit 5a69128807
3 changed files with 30 additions and 17 deletions

View File

@ -704,7 +704,8 @@ namespace FreeSql.Internal.CommonProvider {
Expression.Add(dataIndexExp, Expression.Constant(1))
);
else {
readExpAssign = Expression.Call(Utils.MethodExecuteArrayRowReadClassOrTuple, new Expression[] { Expression.Constant(null, typeof(string)), Expression.Constant(prop.PropertyType), Expression.Constant(null, typeof(int[])), rowExp, dataIndexExp, Expression.Constant(_commonUtils) });
var propLazyType = _commonUtils.GetTableByEntity(prop.PropertyType)?.TypeLazy ?? prop.PropertyType;
readExpAssign = Expression.Call(Utils.MethodExecuteArrayRowReadClassOrTuple, new Expression[] { Expression.Constant(null, typeof(string)), Expression.Constant(propLazyType), Expression.Constant(null, typeof(int[])), rowExp, dataIndexExp, Expression.Constant(_commonUtils) });
}
}
blockExp.AddRange(new Expression[] {