Here are the examples of the csharp api class System.Data.Common.CommandTrees.ExpressionBuilder.DbExpressionBuilder.NewRow(System.Collections.Generic.IEnumerable) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
16 Examples
0
1. Example
View licensepublic DbNewInstanceExpression ToExpression() { return DbExpressionBuilder.NewRow(this.arguments); }
0
2. Example
View licenseprotected DbExpression GenerateProjectionCqt(DbExpression row, bool isTopLevel) { if (isTopLevel) { Debug.Assert(this.Slots.Where(slot => slot.IsRequiredByParent).Count() == 1, "Top level projection must project only one slot."); return this.Slots.Where(slot => slot.IsRequiredByParent).Single().AsCqt(row); } else { return DbExpressionBuilder.NewRow( this.Slots.Where(slot => slot.IsRequiredByParent).Select(slot => new KeyValuePair<string, DbExpression>(slot.CqlFieldAlias, slot.AsCqt(row)))); } }
0
3. Example
View licenseprivate static DbExpression ResolveToExpression<TArgument>(TArgument argument) { object untypedArgument = argument; DbExpression constantResult; if (TryResolveToConstant(typeof(TArgument), untypedArgument, out constantResult)) { return constantResult; } if (null == untypedArgument) { return (DbExpression)null; } // Direct DbExpression result if (typeof(DbExpression).IsAssignableFrom(typeof(TArgument))) { return (DbExpression)untypedArgument; } // Row if (typeof(Row).Equals(typeof(TArgument))) { return ((Row)untypedArgument).ToExpression(); } // Conversion from anonymous type instance to DbNewInstanceExpression of a corresponding row type List<KeyValuePair<string, DbExpression>> columnValues; if (TryGetAnonymousTypeValues<TArgument, DbExpression>(untypedArgument, out columnValues)) { return DbExpressionBuilder.NewRow(columnValues); } // The specified instance cannot be resolved to a DbExpression throw EntityUtil.NotSupported(Strings.Cqt_Factory_MethodResultTypeNotSupported(typeof(TArgument).FullName)); }
0
4. Example
View licenseprivate static DbExpression CreateProjectExpression(DbExpressionBinding source, AST.SelectClause selectClause, List<KeyValuePair<string, DbExpression>> projectionItems) { // // Create DbProjectExpression off the projectionItems. // DbExpression projectExpression; if (selectClause.SelectKind == AST.SelectKind.Value) { Debug.Assert(projectionItems.Count == 1, "projectionItems.Count must be 1 for SELECT VALUE"); projectExpression = source.Project(projectionItems[0].Value); } else { projectExpression = source.Project(DbExpressionBuilder.NewRow(projectionItems)); } // // Handle DISTINCT modifier - create DbDistinctExpression over the current projectExpression. // if (selectClause.DistinctKind == AST.DistinctKind.Distinct) { // // Ensure element type is equal-comparable. // ValidateDistinctProjection(projectExpression.ResultType, selectClause); // // Create distinct expression. // projectExpression = projectExpression.Distinct(); } return projectExpression; }
0
5. Example
View licenseinternal static TypeUsage ValidateCreateRef(EntitySet entitySet, EntityType entityType, IEnumerable&/n ..... /n //View Source file for more details /n }
0
6. Example
View licenseprivate DbExpression NormalizeAllSetSources(ExpressionConverter parent, DbExpression argumentExpr) /n ..... /n //View Source file for more details /n }
0
7. Example
View licenseprivate DbExpressionBinding CapWithProject(DbExpressionBinding inputBinding, IList<DbPropertyExpr/n ..... /n //View Source file for more details /n }
0
8. Example
View license[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1309:UseOrdinalString/n ..... /n //View Source file for more details /n }
0
9. Example
View licenseprivate RelOpInfo BuildEmptyProjection(Node relOpNode) { // // Ignor/n ..... /n //View Source file for more details /n }
0
10. Example
View licenseprivate DbExpression RewriteEntity(DbExpression expression, EntityType entityType) { /n ..... /n //View Source file for more details /n }
0
11. Example
View licenseprivate void FixupViewEntitySetDefiningQuery(EntitySet entitySet, MetadataWorkspace metadataWorkspac/n ..... /n //View Source file for more details /n }
0
12. Example
View licenseprivate int BatchRefreshEntitiesByKey(RefreshMode refreshMode, Dictionary<EntityKey, EntityEntry&/n ..... /n //View Source file for more details /n }
0
13. Example
View licenseprivate IEnumerable<DbModificationClause> BuildSetClauses(DbExpressionBinding target, Propagat/n ..... /n //View Source file for more details /n }
0
14. Example
View licenseinternal GeneratedView GetGeneratedView(EntitySetBase extent, MetadataWorkspace workspace, StorageMa/n ..... /n //View Source file for more details /n }
0
15. Example
View licenseprivate static DbExpressionBinding ProcessGroupByClause(DbExpressionBinding source, AST.QueryExpr qu/n ..... /n //View Source file for more details /n }
0
16. Example
View licenseinternal override CqtExpression Translate(ExpressionConverter parent, MethodCallExpression call) /n ..... /n //View Source file for more details /n }