Επεξεργασία

Κοινή χρήση μέσω


RelatedEnd Class

Definition

Represents a base class that implements common functionality for a related end.

public ref class RelatedEnd abstract : System::Data::Objects::DataClasses::IRelatedEnd
[System.Runtime.Serialization.DataContract]
[System.Serializable]
public abstract class RelatedEnd : System.Data.Objects.DataClasses.IRelatedEnd
[<System.Runtime.Serialization.DataContract>]
[<System.Serializable>]
type RelatedEnd = class
    interface IRelatedEnd
Public MustInherit Class RelatedEnd
Implements IRelatedEnd
Inheritance
RelatedEnd
Derived
Attributes
Implements

Remarks

RelatedEnd is the base class for the EntityCollection<TEntity> class and the EntityReference<TEntity> class.

The RelatedEnd class implements functionality that is shared between the EntityCollection<TEntity> and EntityReference<TEntity> classes.

This class is not intended to be used directly in your code.

Properties

IsLoaded

Gets a value that indicates whether all related objects have been loaded.

RelationshipName

Gets the name of the relationship in which this related end participates.

RelationshipSet

Gets a reference to the metadata for the related end.

SourceRoleName

Gets the role name at the source end of the relationship.

TargetRoleName

Gets the role name at the target end of the relationship.

Methods

Attach<TEntity>(IEnumerable<TEntity>, Boolean)

Defines a relationship between two attached objects.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator()

Returns an IEnumerator that iterates through the collection of related objects.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
Load()

When overridden in a derived class, loads the related object or objects into the related end with the default merge option.

Load(MergeOption)

When overridden in a derived class, loads an object or objects from the related end with the specified merge option.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Merge<TEntity>(IEnumerable<TEntity>, MergeOption, Boolean)

Merges related entities into the local EntityCollection<TEntity>.

OnDeserialized(StreamingContext)

Used internally to deserialize entity objects along with the RelationshipManager instances.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
ValidateEntityForAttach<TEntity>(TEntity, Int32, Boolean)

Determines whether an object can be attached to the local collection or reference.

ValidateLoad<TEntity>(MergeOption, String)

Ensures that the related object or objects can be successfully loaded into the local collection or reference.

ValidateOwnerForAttach()

Ensures that the object to which the related end belongs supports an attach operation.

Events

AssociationChanged

Occurs when a change is made to a related end.

Explicit Interface Implementations

IRelatedEnd.Add(IEntityWithRelationships)

Adds an object to the related end.

IRelatedEnd.Add(Object)

Adds an object to the related end.

IRelatedEnd.Attach(IEntityWithRelationships)

Attaches an object at the related end.

IRelatedEnd.Attach(Object)

Attaches an object to the related end.

IRelatedEnd.CreateSourceQuery()

Returns an IEnumerable that represents the objects that belong to the related end.

IRelatedEnd.Remove(IEntityWithRelationships)

Removes an object from the collection at the related end.

IRelatedEnd.Remove(Object)

Removes an object from the related end if the object is part of the related end.

Applies to