NPersistence Reference Guide
Make an instance managed and persistent.

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

Syntax

   
 C# 
void Persist(
	Object entity
)

Parameters

entity
Object
entity instance

Exceptions

ExceptionCondition
NPersistence..::..EntityExistsException if the entity already exists. (If the entity already exists, the EntityExistsException may be thrown when the persist operation is invoked, or the EntityExistsException or another PersistenceException may be thrown at flush or commit time.)
System..::..ArgumentException if the instance is not an entity
NPersistence..::..TransactionRequiredException if invoked on a container-managed entity manager of type PersistenceContextType.TRANSACTION and there is no transaction

See Also