NPersistence Reference Guide
Refresh the state of the instance from the database, overwriting changes made to the entity, if any.

Namespace: NPersistence
Assembly: NPersistence (in NPersistence.dll) Version: 2.0.0.0 (2.0.0.0)

Syntax

   
 C# 
void Refresh(
	Object entity
)

Parameters

entity
Object
entity instance

Exceptions

ExceptionCondition
System..::..ArgumentException if the instance is not an entity or the entity is not managed
NPersistence..::..TransactionRequiredException if invoked on a container-managed entity manager of type PersistenceContextType.TRANSACTION and there is no transaction
NPersistence..::..EntityNotFoundException if the entity no longer exists in the database

See Also