EntityReference<TEntity> Class
Models a relationship end with multiplicity 1.
Assembly: EntityFramework (in EntityFramework.dll)
System.Data.Entity.Core.Objects.DataClasses.RelatedEnd
System.Data.Entity.Core.Objects.DataClasses.EntityReference
System.Data.Entity.Core.Objects.DataClasses.EntityReference<TEntity>
Name | Description | |
---|---|---|
![]() | EntityReference<TEntity>() | Creates a new instance of EntityReference<TEntity>. |
Name | Description | |
---|---|---|
![]() | EntityKey | Returns the key for the related object.(Inherited from EntityReference.) |
![]() | 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.) |
![]() | Value | Gets or sets the related object returned by this EntityReference<TEntity> . |
Name | Description | |
---|---|---|
![]() | Attach(TEntity) | Creates a many-to-one or one-to-one relationship between two objects in the object context. |
![]() | CreateSourceQuery() | Creates an equivalent object query that returns the related object. |
![]() | Equals(Object) | (Inherited from Object.) |
![]() | Finalize() | (Inherited from Object.) |
![]() | GetEnumerator() | Returns an IEnumerator that iterates through the collection of related objects.(Inherited from RelatedEnd.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetType() | (Inherited from Object.) |
![]() | Load() | Loads the related object or objects into the related end with the default merge option.(Inherited from RelatedEnd.) |
![]() | Load(MergeOption) | Loads the related object for this EntityReference<TEntity> with the specified merge option.(Overrides RelatedEnd.Load(MergeOption).) |
![]() | LoadAsync(CancellationToken) | Asynchronously loads the related object or objects into the related end with the default merge option.(Inherited from RelatedEnd.) |
![]() | LoadAsync(MergeOption, CancellationToken) | Asynchronously loads the related entity or entities into the related end using the default merge option.(Overrides RelatedEnd.LoadAsync(MergeOption, CancellationToken).) |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | OnDeserialized(StreamingContext) | Used internally to deserialize entity objects along with the RelationshipManager instances.(Inherited from RelatedEnd.) |
![]() | OnRefDeserialized(StreamingContext) | This method is used internally to serialize related entity objects. |
![]() | OnSerializing(StreamingContext) | This method is used internally to serialize related entity objects. |
![]() | ToString() | (Inherited from Object.) |
Name | Description | |
---|---|---|
![]() | AssociationChanged | Occurs when a change is made to a related end.(Inherited from RelatedEnd.) |
Name | Description | |
---|---|---|
![]() ![]() | IRelatedEnd.Add(IEntityWithRelationships) | Adds an entity to the related end. This method works in exactly the same way as Add(object). It is maintained for backward compatibility with previous versions of IRelatedEnd.(Inherited from RelatedEnd.) |
![]() ![]() | IRelatedEnd.Add(Object) | Adds an entity to the related end. If the owner is attached to a cache then the 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.(Inherited from RelatedEnd.) |
![]() ![]() | IRelatedEnd.Attach(IEntityWithRelationships) | Attaches an entity to the related end. This method works in exactly the same way as Attach(object). It is maintained for backward compatibility with previous versions of IRelatedEnd.(Inherited from RelatedEnd.) |
![]() ![]() | IRelatedEnd.Attach(Object) | Attaches an entity to the related end. If the related end is already filled or partially filled, this merges the existing entities with the given entity. The given entity is not assumed to be the complete set of related entities. Owner and all entities passed in must be in Unchanged or Modified state. Deleted elements are allowed only when the state manager is already tracking the relationship instance.(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 entity from the related end. This method works in exactly the same way as Remove(object). It is maintained for backward compatibility with previous versions of IRelatedEnd.(Inherited from RelatedEnd.) |
![]() ![]() | IRelatedEnd.Remove(Object) | Removes an entity from the related end. If owner is attached to a cache, marks relationship for deletion and if the relationship is composition also marks the entity for deletion.(Inherited from RelatedEnd.) |
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.