Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ObjectContext::GetObjectByKey Method (EntityKey^)

Entity Framework 6.0
 

Returns an object that has the specified entity key.

Namespace:   System.Data.Entity.Core.Objects
Assembly:  EntityFramework (in EntityFramework.dll)

public:
virtual Object^ GetObjectByKey(
	EntityKey^ key
)

Parameters

key
Type: System.Data.Entity.Core::EntityKey^

The key of the object to be found.

Return Value

Type: System::Object^

An Object that is an instance of an entity type.

Exception Condition
ArgumentNullException

The key parameter is null.

ObjectNotFoundException

The object is not found in either the ObjectStateManager or the data source.

Return to top
Show: