System.Data.Common.CommandTrees.DbExpression.Property(string)

Here are the examples of the csharp api class System.Data.Common.CommandTrees.DbExpression.Property(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

28 Examples 7

1. Example

Project: referencesource
Source File: CqlBlock.cs
internal DbExpression FindInput(DbExpression row)
            {
                DbExpression cqt = row;
                for (int i = m_parentQualifiers.Count - 1; i >= m_indexInParentQualifiers; --i)
                {
                    cqt = cqt.Property(m_parentQualifiers[i]);
                }
                return cqt.Property(m_leafQualifier);
            }

2. Example

Project: referencesource
Source File: CellIdBoolean.cs
internal override DbExpression AsCqt(DbExpression row, bool skipIsNotNull)
        {
            // Get e.g., row._from1
            return row.Property(SlotName);
        }

3. Example

Project: referencesource
Source File: UpdateCompiler.cs
private static DbExpression GeneratePropertyExpression(DbExpressionBinding target, EdmProperty property)
        {
            Debug.Assert(null != target && null != property);

            return target.Variable.Property(property);
        }

4. Example

Project: referencesource
Source File: TypeConstant.cs
internal override DbExpression AsCqt(DbExpression row, MemberPath outputMember)
        {
            DbExpression cqt = null;

            AsCql(
                // createRef action
                (refScopeEntitySet, keyMemberOutputPaths) =>
                {
                    // Construct a scoped reference: CreateRef(CPerson1Set, NewRow(pid1, pid2), CPerson1)
                    EntityType refEntityType = (EntityType)(((RefType)outputMember.EdmType).ElementType);
                    cqt = refScopeEntitySet.CreateRef(
                        refEntityType,
                        keyMemberOutputPaths.Select(km => row.Property(km.CqlFieldAlias)));
                },
                // createType action
                (membersOutputPaths) =>
                {
                    // Construct an entity/complex/Association type in the Members order for fields: CPerson(CPerson1_Pid, CPerson1_Name)
                    cqt = TypeUsage.Create(m_edmType).New(
                        membersOutputPaths.Select(m => row.Property(m.CqlFieldAlias)));
                },
                outputMember);

            return cqt;
        }

5. Example

Project: referencesource
Source File: WithStatement.cs
internal DbRelatedEntityRef AsCqt(DbExpression row)
        {
            return DbExpressionBuilder.CreateRelatedEntityRef(
                m_fromEnd, 
                m_toEnd,
                m_toEndEntitySet.CreateRef(m_toEndEntityType, m_toEndEntityKeyMemberPaths.Select(keyMember => row.Property(keyMember.CqlFieldAlias))));
        }

6. Example

Project: referencesource
Source File: CTreeGenerator.cs
internal override bool TryResolveVar(Var targetVar, out DbExpression resultExpr)
            {
                resultExpr = null;
                VarInfo foundInfo = null;
                if (_definedVars.TryGetInfo(targetVar, out foundInfo))
                {
                    resultExpr = this.BindingReference;
                    foreach (string propName in foundInfo.PropertyPath)
                    {
                        resultExpr = resultExpr.Property(propName);
                    }

                    return true;
                }

                return false;
            }

7. Example

Project: referencesource
Source File: StaticContext.cs
internal SourceScopeEntry AddParentVar(DbVariableReferenceExpression parentVarRef)
        {
            //
            // No parent var adjustment is allowed while adjusted to group var (see AdjustToGroupVar(...) for more info).
            //
            Debug.Assert(_groupVarBasedExpression == null, "_groupVarBasedExpression == null");
            Debug.Assert(_groupAggBasedExpression == null, "_groupAggBasedExpression == null");

            if (_propRefs == null)
            {
                Debug.Assert(_varBasedExpression is DbVariableReferenceExpression, "_varBasedExpression is DbVariableReferenceExpression");
                _propRefs = new List<string>(2);
                _propRefs.Add(((DbVariableReferenceExpression)_varBasedExpression).VariableName);
            }
            
            _varBasedExpression = parentVarRef;
            for (int i = _propRefs.Count - 1; i >= 0; --i)
            {
                _varBasedExpression = _varBasedExpression.Property(_propRefs[i]);
            }
            _propRefs.Add(parentVarRef.VariableName);

            return this;
        }

8. Example

Project: referencesource
Source File: StaticContext.cs
internal void AdjustToGroupVar(DbVariableReferenceExpression parentVarRef, DbVariableReferenceExpres/n ..... /n //View Source file for more details /n }

9. Example

Project: referencesource
Source File: FunctionImportMappingComposable.cs
private DbExpression GenerateColumnRef(DbExpression row, EdmProperty column)
        {
            Debug.Assert(row.ResultType.EdmType.BuiltInTypeKind == BuiltInTypeKind.RowType, "Input type is expected to be a row type.");
            var rowType = (RowType)row.ResultType.EdmType;
            Debug.Assert(rowType.Properties.Contains(column.Name), "Column name must be resolvable in the TVF result type.");
            return row.Property(column.Name);
        }

10. Example

Project: referencesource
Source File: ExpressionConverter.cs
private DbExpression NormalizeSetSource(DbExpression input)
        {
            Debug.Assert(null /n ..... /n //View Source file for more details /n }

11. Example

Project: referencesource
Source File: MethodCallTranslator.cs
private static DbExpression ProcessResultSelector(ExpressionConverter parent, MethodCallExpression c/n ..... /n //View Source file for more details /n }

12. Example

Project: referencesource
Source File: Translator.cs
private static bool TryResolveAsProperty(ExpressionConverter parent,
                MemberInfo clrM/n ..... /n //View Source file for more details /n }

13. Example

Project: referencesource
Source File: Translator.cs
private static DbExpression TranslateNavigationProperty(ExpressionConverter parent, MemberInfo clrMe/n ..... /n //View Source file for more details /n }

14. Example

Project: referencesource
Source File: Sql8ExpressionRewriter.cs
private void FlattenProperties(DbExpression input, IList<DbPropertyExpression> flattenedProperties)
        {
            IList<EdmProperty> properties = TypeHelpers.GetProperties(input.ResultType);
            Debug.Assert(properties.Count != 0, "No nested properties when FlattenProperties called?");

            for (int i = 0; i < properties.Count; i++)
            {
                DbExpression propertyInput = input;

                DbPropertyExpression propertyExpression = propertyInput.Property(properties[i]);
                if (TypeSemantics.IsPrimitiveType(properties[i].TypeUsage))
                {
                    flattenedProperties.Add(propertyExpression);
                }
                else
                {
                    Debug.Assert(TypeSemantics.IsEntityType(properties[i].TypeUsage) || TypeSemantics.IsRowType(properties[i].TypeUsage),
                        "The input to FlattenProperties is not of EntityType or RowType?");

                    FlattenProperties(propertyExpression, flattenedProperties);
                }
            }
        }

15. Example

Project: referencesource
Source File: SemanticAnalyzer.cs
private static List<KeyValuePair<string, DbExpression>> ProcessGroupPartitionDefinitions/n ..... /n //View Source file for more details /n }

16. Example

Project: referencesource
Source File: FunctionImportMappingComposable.cs
private DbExpression GenerateScalarResultMappingView(DbExpression storeFunctionInvoke)
        {
   /n ..... /n //View Source file for more details /n }

17. Example

Project: referencesource
Source File: ExpressionConverter.cs
private DbExpression RecursivelyRewriteEqualsExpression(DbExpression left, DbExpression right, Equal/n ..... /n //View Source file for more details /n }

18. Example

Project: referencesource
Source File: ObjectFullSpanRewriter.cs
internal override SpanTrackingInfo CreateEntitySpanTrackingInfo(DbExpression expression, EntityType /n ..... /n //View Source file for more details /n }

19. Example

Project: referencesource
Source File: ITreeGenerator.cs
private bool TryRewriteKeyPropertyAccess(DbPropertyExpression propertyExpression, out DbExpression r/n ..... /n //View Source file for more details /n }

20. Example

Project: referencesource
Source File: MethodCallTranslator.cs
private DbExpression NormalizeAllSetSources(ExpressionConverter parent, DbExpression argumentExpr)
 /n ..... /n //View Source file for more details /n }

21. Example

Project: referencesource
Source File: Sql8ExpressionRewriter.cs
private DbExpressionBinding CapWithProject(DbExpressionBinding inputBinding, IList<DbPropertyExpr/n ..... /n //View Source file for more details /n }

22. Example

Project: referencesource
Source File: MethodCallTranslator.cs
internal override CqtExpression Translate(ExpressionConverter parent, MethodCallExpression call, Seq/n ..... /n //View Source file for more details /n }

23. Example

Project: referencesource
Source File: MethodCallTranslator.cs
internal override DbExpression Translate(ExpressionConverter parent, MethodCallExpression call)
    /n ..... /n //View Source file for more details /n }

24. Example

Project: referencesource
Source File: ObjectSpanRewriter.cs
private DbExpression RewriteRow(DbExpression expression, RowType rowType)
        {
            DbLa/n ..... /n //View Source file for more details /n }

25. Example

Project: referencesource
Source File: UpdateCompiler.cs
private IEnumerable<DbModificationClause> BuildSetClauses(DbExpressionBinding target, Propagat/n ..... /n //View Source file for more details /n }

26. Example

Project: referencesource
Source File: SemanticAnalyzer.cs
private static DbExpressionBinding ProcessGroupByClause(DbExpressionBinding source, AST.QueryExpr qu/n ..... /n //View Source file for more details /n }

27. Example

Project: referencesource
Source File: MethodCallTranslator.cs
internal override CqtExpression Translate(ExpressionConverter parent, MethodCallExpression call)
   /n ..... /n //View Source file for more details /n }

28. Example

Project: referencesource
Source File: SemanticAnalyzer.cs
private static Dictionary<AST.BuiltInKind, BuiltInExprConverter> CreateBuiltInExprConverter()
/n ..... /n //View Source file for more details /n }