This documentation is archived and is not being maintained.

EntityKey.NoEntitySetKey Field

A singleton EntityKey by which a read-only entity is identified.

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

public static readonly EntityKey NoEntitySetKey

A read-only entity identifies an entity that is valid in every way, except that it is not associated with an actual entity set. This can occur as part of the result of an Entity SQL query that constructs and returns an entity instance specified within the text of the query (as opposed to an entity that was retrieved from a database table). An entity that does not have an entity set cannot be persisted to the database until it is associated with some entity set. Therefore, the object materializer will treat this kind of entity as if the NoTracking merge option was specified, regardless of the actual merge option that was specified. An entity object will be created, but its identity will not be resolved and it will not be added to the state manager as part of the materialization process.

.NET Framework

Supported in: 4, 3.5 SP1

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.