Поделиться через


ITable.Attach Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Include Protected Members
Include Inherited Members

Include Silverlight Members
Include Silverlight for Windows Phone Members
Include XNA Framework Members

Allows deserialized entities to be associated with a new instance of a DataContext so that they can be updated or deleted from the database.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

  Name Description
Public methodSupported by Silverlight for Windows Phone Attach(Object) Attaches an entity to the DataContext in an unmodified state.
Public methodSupported by Silverlight for Windows Phone Attach(Object, Boolean) Attaches all entities of a collection to the DataContext in either a modified or unmodified state.
Public methodSupported by Silverlight for Windows Phone Attach(Object, Object) Attaches an entity to the DataContext in either a modified or unmodified state by specifying both the entity and its original state.

Top

Remarks

If a required member is missing, a ChangeConflictException is thrown during SubmitChanges.