DbExpressionBuilder.NewRow Method (IEnumerable<KeyValuePair<String, DbExpression>>)
Creates a new DbNewInstanceExpression that produces a row with the specified named columns and the given values, specified as expressions.
Assembly: EntityFramework (in EntityFramework.dll)
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public static DbNewInstanceExpression NewRow( IEnumerable<KeyValuePair<string, DbExpression>> columnValues )
Parameters
- columnValues
-
Type:
System.Collections.Generic.IEnumerable<KeyValuePair<String, DbExpression>>
A list of string-DbExpression key-value pairs that defines the structure and values of the row.
Return Value
Type: System.Data.Entity.Core.Common.CommandTrees.DbNewInstanceExpressionA new DbNewInstanceExpression that represents the construction of the row.
Exception | Condition |
---|---|
ArgumentNullException | columnValues is null or contains an element with a null column name or expression. |
ArgumentException | columnValues is empty, or contains a duplicate or invalid column name. |