RelatedEnd.IRelatedEnd.Attach Method

Definition

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.

C#
void IRelatedEnd.Attach(System.Data.Objects.DataClasses.IEntityWithRelationships entity);

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

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

IRelatedEnd.Attach(Object)

Attaches an object to the related end.

C#
void IRelatedEnd.Attach(object entity);

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.

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1