EntitySet.Attach 方法 (TEntity)

以未修改狀態將指定的 Entity 附加至這個實體集。此外,也會以遞迴方式附加所有可透過關聯取得的未附加實體。

命名空間: System.ServiceModel.DomainServices.Client
組件: System.ServiceModel.DomainServices.Client (於 system.servicemodel.domainservices.client.dll)

使用方式

'用途
Dim instance As EntitySet(Of TEntity)
Dim entity As TEntity

instance.Attach(entity)

語法

'宣告
Public Sub Attach ( _
    entity As TEntity _
)
public void Attach (
    TEntity entity
)
public:
void Attach (
    TEntity entity
)
public void Attach (
    TEntity entity
)
public function Attach (
    entity : TEntity
)

參數

  • entity
    要附加的實體。

執行緒安全性

任何這個類型的公用靜態 (在 Visual Basic 中為 共用) 成員都具備執行緒安全。 不保證任何執行個體成員安全執行緒。

平台

開發平台

Windows XP Home Edition, Windows XP Professional, Windows Server 2003 、Windows Server 2008 和 Windows 2000

目標平台

另請參閱

參考

EntitySet 泛型類別
EntitySet 成員
System.ServiceModel.DomainServices.Client 命名空間