RelatedEnd.IRelatedEnd.Add 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.
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.
virtual void System.Data.Objects.DataClasses.IRelatedEnd.Add(System::Data::Objects::DataClasses::IEntityWithRelationships ^ entity) = System::Data::Objects::DataClasses::IRelatedEnd::Add;
void IRelatedEnd.Add (System.Data.Objects.DataClasses.IEntityWithRelationships entity);
abstract member System.Data.Objects.DataClasses.IRelatedEnd.Add : System.Data.Objects.DataClasses.IEntityWithRelationships -> unit
override this.System.Data.Objects.DataClasses.IRelatedEnd.Add : System.Data.Objects.DataClasses.IEntityWithRelationships -> unit
Sub Add (entity As IEntityWithRelationships) Implements IRelatedEnd.Add
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
IRelatedEnd.Add(Object)
Adds an object to the related end.
virtual void System.Data.Objects.DataClasses.IRelatedEnd.Add(System::Object ^ entity) = System::Data::Objects::DataClasses::IRelatedEnd::Add;
void IRelatedEnd.Add (object entity);
abstract member System.Data.Objects.DataClasses.IRelatedEnd.Add : obj -> unit
override this.System.Data.Objects.DataClasses.IRelatedEnd.Add : obj -> unit
Sub Add (entity As Object) Implements IRelatedEnd.Add
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.