Refresh Method (Object, Dictionary)
NPersistence Reference Guide
Refresh the state of the instance from the database, using the specified properties, and overwriting changes made to the entity, if any. If a vendor-specific property or hint is not recognized, it is silently ignored.

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

Syntax

   
 C# 
void Refresh(
	Object entity,
	Dictionary<string, Object> properties
)

Parameters

entity
Object
entity instance
properties
Dictionary<(Of <(<'String, Object>)>)>
standard and vendor-specific properties and hints

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