NPersistence Reference Guide
Assembly: NPersistence (in NPersistence.dll) Version: 2.0.0.0 (2.0.0.0)
Refresh the state of the instance from the database,
overwriting changes made to the entity, if any.
Namespace: NPersistenceAssembly: 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
Exception | Condition |
---|---|
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 |