DbExpressionBuilder.NewCollection 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
NewCollection(IEnumerable<DbExpression>) |
建立新的 DbNewInstanceExpression,它會建構包含指定項目的集合。 集合的型別是以項目的一般型別為基礎。 如果沒有一般項目型別存在,就會擲回例外狀況。 |
NewCollection(DbExpression[]) |
建立新的 DbNewInstanceExpression,它會建構包含指定項目的集合。 集合的型別是以項目的一般型別為基礎。 如果沒有一般項目型別存在,就會擲回例外狀況。 |
NewCollection(IEnumerable<DbExpression>)
建立新的 DbNewInstanceExpression,它會建構包含指定項目的集合。 集合的型別是以項目的一般型別為基礎。 如果沒有一般項目型別存在,就會擲回例外狀況。
public static System.Data.Entity.Core.Common.CommandTrees.DbNewInstanceExpression NewCollection(System.Collections.Generic.IEnumerable<System.Data.Entity.Core.Common.CommandTrees.DbExpression> elements);
static member NewCollection : seq<System.Data.Entity.Core.Common.CommandTrees.DbExpression> -> System.Data.Entity.Core.Common.CommandTrees.DbNewInstanceExpression
Public Function NewCollection (elements As IEnumerable(Of DbExpression)) As DbNewInstanceExpression
參數
- elements
- IEnumerable<DbExpression>
提供集合項目的運算式清單。
傳回
含有指定之集合型別及引數的新 DbNewInstanceExpression。
例外狀況
專案為 null,或包含 null。
元素是空的,或包含不存在常見結果類型的運算式。
適用於
NewCollection(DbExpression[])
建立新的 DbNewInstanceExpression,它會建構包含指定項目的集合。 集合的型別是以項目的一般型別為基礎。 如果沒有一般項目型別存在,就會擲回例外狀況。
public static System.Data.Entity.Core.Common.CommandTrees.DbNewInstanceExpression NewCollection(params System.Data.Entity.Core.Common.CommandTrees.DbExpression[] elements);
static member NewCollection : System.Data.Entity.Core.Common.CommandTrees.DbExpression[] -> System.Data.Entity.Core.Common.CommandTrees.DbNewInstanceExpression
Public Function NewCollection (ParamArray elements As DbExpression()) As DbNewInstanceExpression
參數
- elements
- DbExpression[]
提供集合項目的運算式清單。
傳回
含有指定之集合型別及引數的新 DbNewInstanceExpression。
例外狀況
專案為 null,或包含 null。。
元素是空的,或包含不存在常見結果類型的運算式。