示例#1
0
        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));
        }
示例#2
0
        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));
        }