ITable.GetOriginalEntityState(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves original values.
public:
System::Object ^ GetOriginalEntityState(System::Object ^ entity);
public object GetOriginalEntityState (object entity);
abstract member GetOriginalEntityState : obj -> obj
Public Function GetOriginalEntityState (entity As Object) As Object
Parameters
- entity
- Object
The entity whose original value is to be retrieved.
Returns
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.
Remarks
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.