5 instantiations of DbNewInstanceExpression
System.Data.Entity (5)
System\Data\Common\CommandTrees\ExpressionBuilder\DbExpressionBuilder.cs (5)
1602return new DbNewInstanceExpression(resultType, validArguments); 1637return new DbNewInstanceExpression(collectionResultType, validElements); 1651return new DbNewInstanceExpression(validResultType, validElements); 1668return new DbNewInstanceExpression(resultType, validElements); 2829return new DbNewInstanceExpression(resultType, validAttributes, validRelatedRefs);
89 references to DbNewInstanceExpression
System.Data.Entity (89)
System\Data\Common\CommandTrees\BasicExpressionVisitor.cs (2)
509/// Visitor pattern method for <see cref="DbNewInstanceExpression"/>. 513public override void Visit(DbNewInstanceExpression expression)
System\Data\Common\CommandTrees\DbExpressionVisitor.cs (1)
192public abstract void Visit(DbNewInstanceExpression expression);
System\Data\Common\CommandTrees\DbExpressionVisitor_TResultType.cs (1)
220public abstract TResultType Visit(DbNewInstanceExpression expression);
System\Data\Common\CommandTrees\DefaultExpressionVisitor.cs (1)
734public override DbExpression Visit(DbNewInstanceExpression expression)
System\Data\Common\CommandTrees\ExpressionBuilder\DbExpressionBuilder.cs (18)
1543/// Creates a new <see cref="DbNewInstanceExpression"/>. If the type argument is a collection type, the arguments specify the elements of the collection. Otherwise the arguments are used as property or column values in the new instance. 1565public static DbNewInstanceExpression New(this TypeUsage instanceType, IEnumerable<DbExpression> arguments) 1571/// Creates a new <see cref="DbNewInstanceExpression"/>. If the type argument is a collection type, the arguments specify the elements of the collection. Otherwise the arguments are used as property or column values in the new instance. 1593public static DbNewInstanceExpression New(this TypeUsage instanceType, params DbExpression[] arguments) 1598private static DbNewInstanceExpression NewInstance(TypeUsage instanceType, IEnumerable<DbExpression> arguments) 1606/// Creates a new <see cref="DbNewInstanceExpression"/> that constructs a collection containing the specified elements. The type of the collection is based on the common type of the elements. If no common element type exists an exception is thrown. 1614public static DbNewInstanceExpression NewCollection(IEnumerable<DbExpression> elements) 1620/// Creates a new <see cref="DbNewInstanceExpression"/> that constructs a collection containing the specified elements. The type of the collection is based on the common type of the elements. If no common element type exists an exception is thrown. 1628public static DbNewInstanceExpression NewCollection(params DbExpression[] elements) 1633private static DbNewInstanceExpression CreateNewCollection(IEnumerable<DbExpression> elements) 1641/// Creates a new <see cref="DbNewInstanceExpression"/> that constructs an empty collection of the specified collection type. 1647public static DbNewInstanceExpression NewEmptyCollection(this TypeUsage collectionType) 1656/// Creates a new <see cref="DbNewInstanceExpression"/> that produces a row with the specified named columns and the given values, specified as expressions. 1664public static DbNewInstanceExpression NewRow(IEnumerable<KeyValuePair<string, DbExpression>> columnValues) 2797/// DbRelatedEntityRefs are used in conjuction with <see cref="DbNewInstanceExpression"/> 2813/// Creates a new <see cref="DbNewInstanceExpression"/> that constructs an instance of an Entity type 2823/// <returns>A new DbNewInstanceExpression that represents the construction of the Entity, and includes the specified related Entity information in the see <see cref="DbNewInstanceExpression.RelatedEntityReferences"/> collection.</returns> 2824internal static DbNewInstanceExpression CreateNewEntityWithRelationshipsExpression(EntityType entityType, IList<DbExpression> attributeValues, IList<DbRelatedEntityRef> relationships)
System\Data\Common\CommandTrees\ExpressionBuilder\Row.cs (2)
34/// Creates a new <see cref="DbNewInstanceExpression"/> that constructs a new row based on the columns 39public DbNewInstanceExpression ToExpression()
System\Data\Common\CommandTrees\Internal\ExpressionDumper.cs (1)
652public override void Visit(DbNewInstanceExpression e)
System\Data\Common\CommandTrees\Internal\ExpressionKeyGen.cs (1)
491public override void Visit(DbNewInstanceExpression e)
System\Data\Common\CommandTrees\Internal\ExpressionPrinter.cs (1)
751public override TreeNode Visit(DbNewInstanceExpression e)
System\Data\Common\CommandTrees\Internal\PatternMatchRules.cs (3)
296/// Constructs a new pattern that is matched iff the argument expression is a <see cref="DbNewInstanceExpression"/> with arguments that match the specified collection pattern 300return (e => { if (e.ExpressionKind != DbExpressionKind.NewInstance) { return false; } else { DbNewInstanceExpression newInst = (DbNewInstanceExpression)e; return argumentsPattern(newInst.Arguments); } });
System\Data\Common\CommandTrees\Internal\ViewSimplifier.cs (13)
197List<DbNewInstanceExpression> constructors = new List<DbNewInstanceExpression>(); 207constructors.Add((DbNewInstanceExpression)discriminatedConstructor.Then[idx]); 209constructors.Add((DbNewInstanceExpression)discriminatedConstructor.Else); 214constructors.Add((DbNewInstanceExpression)entityProject.Projection); 220DbNewInstanceExpression entityConstructor = constructors[idx]; 280private static DbRelatedEntityRef RelatedEntityRefFromAssociationSetEnd(EntityType constructedEntityType, DbNewInstanceExpression entityConstructor, AssociationSetEnd principalSetEnd, ReferentialConstraint fkConstraint) 440DbNewInstanceExpression rowConstructor = (DbNewInstanceExpression)rowProjection.Projection; 493DbNewInstanceExpression entityThen = (DbNewInstanceExpression)entitySelector.Then[idx]; 634DbNewInstanceExpression innerNew = (DbNewInstanceExpression)innerProject.Projection;
System\Data\Common\CommandTrees\ValueExpressions.cs (2)
549/// for use only with <see cref="DbNewInstanceExpression"/>, where an 'owning' instance of that class 551/// Instances of DbRelatedEntityRef may be specified when creating a <see cref="DbNewInstanceExpression"/> that
System\Data\Common\EntitySql\SemanticAnalyzer.cs (4)
3980DbNewInstanceExpression projectionExpression = (DbNewInstanceExpression)projectExpression.Projection; 4310DbNewInstanceExpression rightColl = (DbNewInstanceExpression)right;
System\Data\Mapping\Update\Internal\Propagator.cs (2)
256DbNewInstanceExpression projection = node.Projection as DbNewInstanceExpression;
System\Data\Mapping\Update\Internal\Propagator.ExtentPlaceholderCreator.cs (1)
106/// building a record, so an entity record type will return a new record (<see cref="DbNewInstanceExpression" />)
System\Data\Mapping\Update\Internal\UpdateExpressionVisitor.cs (1)
194public override TReturn Visit(DbNewInstanceExpression expression)
System\Data\Mapping\ViewGeneration\DiscriminatorMap.cs (6)
194var constructor = (DbNewInstanceExpression)then; 270var newX = (DbNewInstanceExpression)x; 271var newY = (DbNewInstanceExpression)y;
System\Data\Mapping\ViewGeneration\Structures\CaseStatement.cs (2)
341DbNewInstanceExpression typeConstructor = slotValueExpr as DbNewInstanceExpression;
System\Data\Mapping\ViewValidator.cs (2)
140public override void Visit(DbNewInstanceExpression expression) 364public override DbExpressionEntitySetInfo Visit(DbNewInstanceExpression expression)
System\Data\Objects\ELinq\ExpressionConverter.cs (1)
1572private DbNewInstanceExpression CreateNewRowExpression(List<KeyValuePair<string, DbExpression>> columns, InitializerMetadata initializerMetadata)
System\Data\Objects\ELinq\MethodCallTranslator.cs (8)
2249IList<DbExpression> arguments = ((DbNewInstanceExpression)source).Arguments; 2673var lojLeft = (DbNewInstanceExpression)loj.Left.Expression; 2933var projection = (DbNewInstanceExpression)project.Projection; 2963var innerProjection = (DbNewInstanceExpression)innerProject.Projection; 2973var newProjection = projection.ResultType.New(newProjectionArguments);
System\Data\Objects\ELinq\Translator.cs (2)
750DbNewInstanceExpression projection = parent.CreateNewRowExpression(recordColumns, initializerMetadata); 861DbNewInstanceExpression projection = parent.CreateNewRowExpression(recordColumns, initializerMetadata);
System\Data\Objects\Internal\ObjectSpanRewriter.cs (3)
339DbNewInstanceExpression newRow; 348newRow = lambdaExpression.Lambda.Body as DbNewInstanceExpression; 352newRow = expression as DbNewInstanceExpression;
System\Data\Query\PlanCompiler\CTreeGenerator.cs (2)
2280DbNewInstanceExpression collectionExpr = DbExpressionBuilder.NewCollection(collectionElements); 2295DbNewInstanceExpression collectionExpr = DbExpressionBuilder.NewCollection(new [] { DbExpressionBuilder.Constant(1) });
System\Data\Query\PlanCompiler\ITreeGenerator.cs (1)
2033public override Node Visit(DbNewInstanceExpression e)
System\Data\SqlClient\SqlGen\DmlSqlGenerator.cs (1)
609public override void Visit(DbNewInstanceExpression expression)
System\Data\SqlClient\SqlGen\Sql8ConformanceChecker.cs (1)
511public override bool Visit(DbNewInstanceExpression expression)
System\Data\SqlClient\SqlGen\SqlGenerator.cs (6)
1759public override ISqlFragment Visit(DbNewInstanceExpression e) 2259DbNewInstanceExpression newInstanceExpression = e.Projection as DbNewInstanceExpression; 2911private ISqlFragment VisitCollectionConstructor(DbNewInstanceExpression e) 3247/// This replaces <see cref="Visit(DbNewInstanceExpression)"/>, since 3257private ISqlFragment VisitNewInstanceExpression(DbNewInstanceExpression e, bool aliasesNeedRenaming, out Dictionary<string, Symbol> newColumns)