Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
NoEntitySetKey Field
Collapse the table of content
Expand the table of content

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

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft