src/EntityFramework/Core/Objects/DataClasses/EntityReference`.cs
// Identical code is in EntityCollection, but this can't be moved to the base class because it relies on the
// knowledge of the generic type, and the base class isn't generic
/// <summary>Creates an equivalent object query that returns the related object.</summary>
/// <returns>
/// An <see cref="T:System.Data.Entity.Core.Objects.ObjectQuery`1" /> that returns the related object.
/// </returns>
/// <exception cref="T:System.InvalidOperationException">
/// When the object is in an <see cref="F:System.Data.Entity.EntityState.Added" /> state 
/// or when the object is in a <see cref="F:System.Data.Entity.EntityState.Detached" />
/// state with a <see cref="P:System.Data.Entity.Core.Objects.ObjectQuery.MergeOption" />
/// other than <see cref="F:System.Data.Entity.Core.Objects.MergeOption.NoTracking" />.
/// </exception>
Creates an equivalent object query that returns the related object.
Creates an equivalent object query that returns the related object .
public ObjectQuery<TEntity> CreateSourceQuery()
        {
            CheckOwnerNull();
            bool hasResults;
            return CreateSourceQuery<TEntity>(DefaultMergeOption, out hasResults);
        }
public ObjectQuery < TEntity > CreateSourceQuery ( ) { CheckOwnerNull ( ) ; bool hasResults ; return CreateSourceQuery < TEntity > ( DefaultMergeOption , out hasResults ) ; }
Creates an equivalent object query that returns the related object.
Creates an equivalent object query that returns the related object .
An  that returns the related object.
An that returns the related object .
When the object is in an  state
or when the object is in a
state with a
other than .
When the object is in an state or when the object is in a state with a other than .