Share via


RelatedEnd.IRelatedEnd.Attach Method

Definition

Overloads

IRelatedEnd.Attach(IEntityWithRelationships)

Attaches an entity to the related end. This method works in exactly the same way as Attach(object). It is maintained for backward compatibility with previous versions of IRelatedEnd.

IRelatedEnd.Attach(Object)

Attaches an entity to the related end. If the related end is already filled or partially filled, this merges the existing entities with the given entity. The given entity is not assumed to be the complete set of related entities. Owner and all entities passed in must be in Unchanged or Modified state. Deleted elements are allowed only when the state manager is already tracking the relationship instance.

IRelatedEnd.Attach(IEntityWithRelationships)

Attaches an entity to the related end. This method works in exactly the same way as Attach(object). It is maintained for backward compatibility with previous versions of IRelatedEnd.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
void IRelatedEnd.Attach (System.Data.Entity.Core.Objects.DataClasses.IEntityWithRelationships entity);
Sub Attach (entity As IEntityWithRelationships) Implements IRelatedEnd.Attach

Parameters

entity
IEntityWithRelationships

The entity to attach to the related end

Implements

Attributes

Exceptions

Thrown when entity is null.

Thrown when the entity cannot be related via the current relationship end.

Applies to

IRelatedEnd.Attach(Object)

Attaches an entity to the related end. If the related end is already filled or partially filled, this merges the existing entities with the given entity. The given entity is not assumed to be the complete set of related entities. Owner and all entities passed in must be in Unchanged or Modified state. Deleted elements are allowed only when the state manager is already tracking the relationship instance.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
void IRelatedEnd.Attach (object entity);
Sub Attach (entity As Object) Implements IRelatedEnd.Attach

Parameters

entity
Object

The entity to attach to the related end

Implements

Attributes

Exceptions

Thrown when entity is null.

Thrown when the entity cannot be related via the current relationship end.

Applies to