Export (0) Print
Expand All

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.5.2, 4.5.1, 4.5, 4, 3.5 SP1

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft