RelatedEnd.Merge<TEntity> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將相關實體合併到本地 EntityCollection<TEntity>。
protected:
generic <typename TEntity>
void Merge(System::Collections::Generic::IEnumerable<TEntity> ^ collection, System::Data::Objects::MergeOption mergeOption, bool setIsLoaded);
protected void Merge<TEntity>(System.Collections.Generic.IEnumerable<TEntity> collection, System.Data.Objects.MergeOption mergeOption, bool setIsLoaded);
member this.Merge : seq<'Entity> * System.Data.Objects.MergeOption * bool -> unit
Protected Sub Merge(Of TEntity) (collection As IEnumerable(Of TEntity), mergeOption As MergeOption, setIsLoaded As Boolean)
類型參數
- TEntity
IEnumerable<T>要合併的實體物件集合類型。
參數
- collection
- IEnumerable<TEntity>
一 IEnumerable<T> 組實體物件,用來加入相關目標。
- mergeOption
- MergeOption
MergeOption在將物件合併成現有 EntityCollection<TEntity>時使用 的 。
- setIsLoaded
- Boolean
表示相關物件集合是否完整且與伺服器相符。
Load(MergeOption)例如將 setIsLoaded 設為 true,但Attach將其設為 false。
備註
Merge<TEntity>此方法由物件服務在關係操作中呼叫。