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); }
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); }