Επεξεργασία

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


EntityReference Class

Definition

Base class that implements non-generic functionality for an EntityReference<TEntity>.

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

Remarks

The EntityReference class exposes the EntityKey of the related object and is a base class for the EntityReference<TEntity> class. An EntityReference<TEntity> object is returned by a navigation property when the related end has a multiplicity of zero or one. For more information, see NavigationProperty Element (CSDL).

Constructors

EntityReference()

Initializes a new instance of the EntityReference class.

Properties

EntityKey

Returns the key for the related object.

IsLoaded

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

(Inherited from RelatedEnd)
RelationshipName

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

(Inherited from RelatedEnd)
RelationshipSet

Gets a reference to the metadata for the related end.

(Inherited from RelatedEnd)
SourceRoleName

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

(Inherited from RelatedEnd)
TargetRoleName

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

(Inherited from RelatedEnd)

Methods

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

Defines a relationship between two attached objects.

(Inherited from RelatedEnd)
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.

(Inherited from RelatedEnd)
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.

(Inherited from RelatedEnd)
Load(MergeOption)

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

(Inherited from RelatedEnd)
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>.

(Inherited from RelatedEnd)
OnDeserialized(StreamingContext)

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

(Inherited from RelatedEnd)
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.

(Inherited from RelatedEnd)
ValidateLoad<TEntity>(MergeOption, String)

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

(Inherited from RelatedEnd)
ValidateOwnerForAttach()

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

(Inherited from RelatedEnd)

Events

AssociationChanged

Occurs when a change is made to a related end.

(Inherited from RelatedEnd)

Explicit Interface Implementations

IRelatedEnd.Add(IEntityWithRelationships)

Adds an object to the related end.

(Inherited from RelatedEnd)
IRelatedEnd.Add(Object)

Adds an object to the related end.

(Inherited from RelatedEnd)
IRelatedEnd.Attach(IEntityWithRelationships)

Attaches an object at the related end.

(Inherited from RelatedEnd)
IRelatedEnd.Attach(Object)

Attaches an object to the related end.

(Inherited from RelatedEnd)
IRelatedEnd.CreateSourceQuery()

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

(Inherited from RelatedEnd)
IRelatedEnd.Remove(IEntityWithRelationships)

Removes an object from the collection at the related end.

(Inherited from RelatedEnd)
IRelatedEnd.Remove(Object)

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

(Inherited from RelatedEnd)

Applies to