RelatedEnd.IRelatedEnd.Attach Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attaches an object at the related end.
Overloads
IRelatedEnd.Attach(IEntityWithRelationships) |
Attaches an object at the related end. |
IRelatedEnd.Attach(Object) |
Attaches an object to the related end. |
IRelatedEnd.Attach(IEntityWithRelationships)
Attaches an object at the related end.
virtual void System.Data.Objects.DataClasses.IRelatedEnd.Attach(System::Data::Objects::DataClasses::IEntityWithRelationships ^ entity) = System::Data::Objects::DataClasses::IRelatedEnd::Attach;
void IRelatedEnd.Attach (System.Data.Objects.DataClasses.IEntityWithRelationships entity);
abstract member System.Data.Objects.DataClasses.IRelatedEnd.Attach : System.Data.Objects.DataClasses.IEntityWithRelationships -> unit
override this.System.Data.Objects.DataClasses.IRelatedEnd.Attach : System.Data.Objects.DataClasses.IEntityWithRelationships -> unit
Sub Attach (entity As IEntityWithRelationships) Implements IRelatedEnd.Attach
Parameters
- entity
- IEntityWithRelationships
The object being attached.
Implements
Remarks
This member is an explicit interface member implementation. It can be used only when the RelatedEnd instance is cast to an IRelatedEnd interface.
The IRelatedEnd.Attach method is only maintained for compatibility with previous versions of the .NET Framework.
Applies to
IRelatedEnd.Attach(Object)
Attaches an object to the related end.
virtual void System.Data.Objects.DataClasses.IRelatedEnd.Attach(System::Object ^ entity) = System::Data::Objects::DataClasses::IRelatedEnd::Attach;
void IRelatedEnd.Attach (object entity);
abstract member System.Data.Objects.DataClasses.IRelatedEnd.Attach : obj -> unit
override this.System.Data.Objects.DataClasses.IRelatedEnd.Attach : obj -> unit
Sub Attach (entity As Object) Implements IRelatedEnd.Attach
Parameters
- entity
- Object
An entity instance to attach to the related end.
Implements
Remarks
If the related end already has some entities attached to it, the existing entities will be merged with the new entity. The new entity is not assumed to be the complete set of related entity objects.
The source entity object and all entity objects passed in must be in an Unchanged or Modified state. Deleted elements are allowed only when the state manager is already tracking the relationship instance.