EntityReference<TEntity>.CreateSourceQuery Method ()
Creates an equivalent object query that returns the related object.
Assembly: EntityFramework (in EntityFramework.dll)
Return Value
Type: System.Data.Entity.Core.Objects.ObjectQuery<TEntity>An ObjectQuery<T> that returns the related object.
Exception | Condition |
---|---|
InvalidOperationException | When the object is in an Added state or when the object is in a Detached state with a MergeOption other than NoTracking. |