Redigera

Dela via


Table<TEntity>.GetOriginalEntityState(TEntity) Method

Definition

Returns a Table<TEntity> instance that contains the original state of the entity.

public:
 TEntity GetOriginalEntityState(TEntity entity);
public TEntity GetOriginalEntityState (TEntity entity);
member this.GetOriginalEntityState : 'Entity -> 'Entity
Public Function GetOriginalEntityState (entity As TEntity) As TEntity

Parameters

entity
TEntity

The entity whose original state is to be returned.

Returns

TEntity

A Table<TEntity> instance that contains the original state of the entity.

Remarks

This method returns the original state of an entity since it was either created or attached to the current DataContext. The original state of an entity that has been serialized and deserialized must be provided by an independent tracking mechanism and supplied when the entity is attached to a new DataContext. For more information, see Data Retrieval and CUD Operations in N-Tier Applications (LINQ to SQL).

Applies to