コード例 #1
0
ファイル: MemberPath.cs プロジェクト: dox0/DotNet471RS3
        internal DbExpression AsCqt(DbExpression row)
        {
            DbExpression cqt = row;

            // Process all items in the path.
            AsCql(
                // accessMember action
                (memberName) =>
            {
                cqt = DbExpressionBuilder.Property(cqt, memberName);
            },
                // getKey action
                () =>
            {
                cqt = cqt.GetRefKey();
            },
                // treatAs action
                (treatAsType) =>
            {
                var typeUsage = TypeUsage.Create(treatAsType);
                cqt           = cqt.TreatAs(typeUsage);
            });

            return(cqt);
        }
コード例 #2
0
 internal DbExpression AsCqt(DbExpression row)
 {
     this.AsCql((Action <string>)(memberName => row = (DbExpression)row.Property(memberName)), (Action)(() => row = (DbExpression)row.GetRefKey()), (Action <StructuralType>)(treatAsType => row = (DbExpression)row.TreatAs(TypeUsage.Create((EdmType)treatAsType))));
     return(row);
 }