EntityCollection<TEntity>.CreateSourceQuery Method ()
Returns an object query that, when it is executed, returns the same set of objects that exists in the current collection.
Assembly: EntityFramework (in EntityFramework.dll)
Return Value
Type: System.Data.Entity.Core.Objects.ObjectQuery<TEntity>An ObjectQuery<T> that represents the entity collection.
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. |