Here are the examples of the csharp api class System.Data.Common.CommandTrees.DbExpression.GetEntityRef() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
5 Examples
0
1. Example
View licenseprivate static ExpressionResolution ConvertRefExpr(AST.Node astExpr, SemanticResolver sr) { AST.RefExpr refExpr = (AST.RefExpr)astExpr; DbExpression converted = ConvertValueExpression(refExpr.ArgExpr, sr); // // check if is entity type // if (!TypeSemantics.IsEntityType(converted.ResultType)) { throw EntityUtil.EntitySqlError(refExpr.ArgExpr.ErrCtx, Strings.RefArgIsNotOfEntityType(converted.ResultType.EdmType.FullName)); } // // create ref expression // converted = converted.GetEntityRef(); Debug.Assert(null != converted, "null != converted"); return new ValueExpression(converted); }
0
2. Example
View licenseprivate static ExpressionResolution ConvertKeyExpr(AST.Node astExpr, SemanticResolver sr) { AST.KeyExpr keyExpr = (AST.KeyExpr)astExpr; DbExpression converted = ConvertValueExpression(keyExpr.ArgExpr, sr); if (TypeSemantics.IsEntityType(converted.ResultType)) { converted = converted.GetEntityRef(); } else if (!TypeSemantics.IsReferenceType(converted.ResultType)) { throw EntityUtil.EntitySqlError(keyExpr.ArgExpr.ErrCtx, Strings.InvalidKeyArgument(converted.ResultType.EdmType.FullName)); } converted = converted.GetRefKey(); Debug.Assert(null != converted, "null != converted"); return new ValueExpression(converted); }
0
3. Example
View licenseprivate bool TryRewriteKeyPropertyAccess(DbPropertyExpression propertyExpression, out DbExpression r/n ..... /n //View Source file for more details /n }
0
4. Example
View licenseprivate DbExpression RewriteEntity(DbExpression expression, EntityType entityType) { /n ..... /n //View Source file for more details /n }
0
5. Example
View licenseprivate int BatchRefreshEntitiesByKey(RefreshMode refreshMode, Dictionary<EntityKey, EntityEntry&/n ..... /n //View Source file for more details /n }