Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetOriginalEntityState Method

ITable.GetOriginalEntityState Method

Retrieves original values.

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

Object GetOriginalEntityState(
	Object entity
)

Parameters

entity
Type: System.Object
The entity whose original value is to be retrieved.

Return Value

Type: System.Object
A copy of the original entity. The value is null if the entity passed in is not tracked. Disconnected entities sent back by a client must be attached before the DataContext can begin to track their state. The "original state" of a newly attached entity is established based on values supplied by the client. The data context does not track the state of disconnected entities.

Note the following:

  • The entity argument must be non-null. Otherwise, a null argument exception is thrown.

  • In the case of the strongly typed (TEntity) method, the type must be mapped and must be an entity type. That is, it must have object ID information in its mapping. Otherwise, a wrong type exception is thrown.

.NET Framework

Supported in: 4, 3.5

.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.

Community Additions

ADD
Show:
© 2015 Microsoft