EntityReference Class

EntityReference Class

.NET Framework (current version)
 

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

Namespace:   System.Data.Objects.DataClasses
Assembly:  System.Data.Entity (in System.Data.Entity.dll)


[SerializableAttribute]
[DataContractAttribute]
public abstract class EntityReference : RelatedEnd

NameDescription
System_CAPS_pubpropertyEntityKey

Returns the key for the related object.

System_CAPS_pubpropertyIsLoaded

Gets a value that indicates whether all related objects have been loaded.(Inherited from RelatedEnd.)

System_CAPS_pubpropertyRelationshipName

Gets the name of the relationship in which this related end participates.(Inherited from RelatedEnd.)

System_CAPS_pubpropertyRelationshipSet

Gets a reference to the metadata for the related end.(Inherited from RelatedEnd.)

System_CAPS_pubpropertySourceRoleName

Gets the role name at the source end of the relationship.(Inherited from RelatedEnd.)

System_CAPS_pubpropertyTargetRoleName

Gets the role name at the target end of the relationship.(Inherited from RelatedEnd.)

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetEnumerator()

Returns an IEnumerator that iterates through the collection of related objects.(Inherited from RelatedEnd.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodLoad()

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

System_CAPS_pubmethodLoad(MergeOption)

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

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodOnDeserialized(StreamingContext)

This API supports the product infrastructure and is not intended to be used directly from your code. Used internally to deserialize entity objects along with the RelationshipManager instances.(Inherited from RelatedEnd.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubeventAssociationChanged

Occurs when a change is made to a related end.(Inherited from RelatedEnd.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIRelatedEnd.Add(IEntityWithRelationships)

Adds an object to the related end.(Inherited from RelatedEnd.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIRelatedEnd.Add(Object)

Adds an object to the related end.(Inherited from RelatedEnd.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIRelatedEnd.Attach(IEntityWithRelationships)

Attaches an object at the related end.(Inherited from RelatedEnd.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIRelatedEnd.Attach(Object)

Attaches an object to the related end.(Inherited from RelatedEnd.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIRelatedEnd.CreateSourceQuery()

Returns an IEnumerable that represents the objects that belong to the related end.(Inherited from RelatedEnd.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIRelatedEnd.Remove(IEntityWithRelationships)

Removes an object from the collection at the related end.(Inherited from RelatedEnd.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIRelatedEnd.Remove(Object)

Removes an object from the related end if the object is part of the related end.(Inherited from RelatedEnd.)

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).

.NET Framework
Available since 3.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft