Прочетете на английски Редактиране

Споделяне чрез


RelatedEnd.IRelatedEnd.Add Method

Definition

Adds an object to the related end.

Overloads

IRelatedEnd.Add(IEntityWithRelationships)

Adds an object to the related end.

IRelatedEnd.Add(Object)

Adds an object to the related end.

IRelatedEnd.Add(IEntityWithRelationships)

Adds an object to the related end.

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

Parameters

entity
IEntityWithRelationships

An object to add to the collection. This object must implement the IEntityWithRelationships interface.

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.Add method is only maintained for compatibility with previous versions of the .NET Framework.

Applies to

.NET Framework 4.8.1 и други версии
Продукт Версии
.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.Add(Object)

Adds an object to the related end.

C#
void IRelatedEnd.Add(object entity);

Parameters

entity
Object

An entity instance to add to the related end.

Implements

Remarks

If the source entity object is attached to a cache, then all the connected ends are added to the object cache and their corresponding relationships are also added to the ObjectStateManager. The RelatedEnd of the relationship is also fixed.

Applies to

.NET Framework 4.8.1 и други версии
Продукт Версии
.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