private object ReadMemberValue(IDataRecord reader, SqlMember member, int ordinal, out int usedOrdinals) { if (member is SqlExpressionMember memberExpr && memberExpr.Expression is SqlTableExpression tableExpression) { return(ReadComplexValue(reader, member.MemberInfo.PropertyType, tableExpression.TableResult.Members, ordinal, out usedOrdinals)); } return(ReadSimpleValue(reader, member.MemberInfo.PropertyType, ordinal, out usedOrdinals)); }
private Expression CompileMemberValue(SqlMember member, Expression recordParameter, int ordinal, out int usedOrdinals) { if (member is SqlExpressionMember memberExpr && memberExpr.Expression is SqlTableExpression tableExpression) { return(CompileComplexValue(member.MemberInfo.PropertyType, tableExpression.TableResult.Members, recordParameter, ordinal, out usedOrdinals)); } usedOrdinals = 1; return(CompileSimpleValue(member.MemberInfo.PropertyType, recordParameter, ordinal)); }