Adds an entity to the internal caches.

Namespace: NHibernate.Engine
Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)

Syntax

C#
public EntityEntry AddEntity(
	Object entity,
	Status status,
	Object[] loadedState,
	EntityKey entityKey,
	Object version,
	LockMode lockMode,
	bool existsInDatabase,
	IEntityPersister persister,
	bool disableVersionIncrement,
	bool lazyPropertiesAreUnfetched
)
Visual Basic
Public Function AddEntity ( _
	entity As Object, _
	status As Status, _
	loadedState As Object(), _
	entityKey As EntityKey, _
	version As Object, _
	lockMode As LockMode, _
	existsInDatabase As Boolean, _
	persister As IEntityPersister, _
	disableVersionIncrement As Boolean, _
	lazyPropertiesAreUnfetched As Boolean _
) As EntityEntry
Visual C++
public:
virtual EntityEntry^ AddEntity(
	Object^ entity, 
	Status status, 
	array<Object^>^ loadedState, 
	EntityKey^ entityKey, 
	Object^ version, 
	LockMode^ lockMode, 
	bool existsInDatabase, 
	IEntityPersister^ persister, 
	bool disableVersionIncrement, 
	bool lazyPropertiesAreUnfetched
) sealed

Parameters

entity
Type: System..::..Object

[Missing <param name="entity"/> documentation for "M:NHibernate.Engine.StatefulPersistenceContext.AddEntity(System.Object,NHibernate.Engine.Status,System.Object[],NHibernate.Engine.EntityKey,System.Object,NHibernate.LockMode,System.Boolean,NHibernate.Persister.Entity.IEntityPersister,System.Boolean,System.Boolean)"]

status
Type: NHibernate.Engine..::..Status

[Missing <param name="status"/> documentation for "M:NHibernate.Engine.StatefulPersistenceContext.AddEntity(System.Object,NHibernate.Engine.Status,System.Object[],NHibernate.Engine.EntityKey,System.Object,NHibernate.LockMode,System.Boolean,NHibernate.Persister.Entity.IEntityPersister,System.Boolean,System.Boolean)"]

loadedState
Type: array<System..::..Object>[]()[][]

[Missing <param name="loadedState"/> documentation for "M:NHibernate.Engine.StatefulPersistenceContext.AddEntity(System.Object,NHibernate.Engine.Status,System.Object[],NHibernate.Engine.EntityKey,System.Object,NHibernate.LockMode,System.Boolean,NHibernate.Persister.Entity.IEntityPersister,System.Boolean,System.Boolean)"]

entityKey
Type: NHibernate.Engine..::..EntityKey

[Missing <param name="entityKey"/> documentation for "M:NHibernate.Engine.StatefulPersistenceContext.AddEntity(System.Object,NHibernate.Engine.Status,System.Object[],NHibernate.Engine.EntityKey,System.Object,NHibernate.LockMode,System.Boolean,NHibernate.Persister.Entity.IEntityPersister,System.Boolean,System.Boolean)"]

version
Type: System..::..Object

[Missing <param name="version"/> documentation for "M:NHibernate.Engine.StatefulPersistenceContext.AddEntity(System.Object,NHibernate.Engine.Status,System.Object[],NHibernate.Engine.EntityKey,System.Object,NHibernate.LockMode,System.Boolean,NHibernate.Persister.Entity.IEntityPersister,System.Boolean,System.Boolean)"]

lockMode
Type: NHibernate..::..LockMode

[Missing <param name="lockMode"/> documentation for "M:NHibernate.Engine.StatefulPersistenceContext.AddEntity(System.Object,NHibernate.Engine.Status,System.Object[],NHibernate.Engine.EntityKey,System.Object,NHibernate.LockMode,System.Boolean,NHibernate.Persister.Entity.IEntityPersister,System.Boolean,System.Boolean)"]

existsInDatabase
Type: System..::..Boolean

[Missing <param name="existsInDatabase"/> documentation for "M:NHibernate.Engine.StatefulPersistenceContext.AddEntity(System.Object,NHibernate.Engine.Status,System.Object[],NHibernate.Engine.EntityKey,System.Object,NHibernate.LockMode,System.Boolean,NHibernate.Persister.Entity.IEntityPersister,System.Boolean,System.Boolean)"]

persister
Type: NHibernate.Persister.Entity..::..IEntityPersister

[Missing <param name="persister"/> documentation for "M:NHibernate.Engine.StatefulPersistenceContext.AddEntity(System.Object,NHibernate.Engine.Status,System.Object[],NHibernate.Engine.EntityKey,System.Object,NHibernate.LockMode,System.Boolean,NHibernate.Persister.Entity.IEntityPersister,System.Boolean,System.Boolean)"]

disableVersionIncrement
Type: System..::..Boolean

[Missing <param name="disableVersionIncrement"/> documentation for "M:NHibernate.Engine.StatefulPersistenceContext.AddEntity(System.Object,NHibernate.Engine.Status,System.Object[],NHibernate.Engine.EntityKey,System.Object,NHibernate.LockMode,System.Boolean,NHibernate.Persister.Entity.IEntityPersister,System.Boolean,System.Boolean)"]

lazyPropertiesAreUnfetched
Type: System..::..Boolean

[Missing <param name="lazyPropertiesAreUnfetched"/> documentation for "M:NHibernate.Engine.StatefulPersistenceContext.AddEntity(System.Object,NHibernate.Engine.Status,System.Object[],NHibernate.Engine.EntityKey,System.Object,NHibernate.LockMode,System.Boolean,NHibernate.Persister.Entity.IEntityPersister,System.Boolean,System.Boolean)"]

Return Value

[Missing <returns> documentation for "M:NHibernate.Engine.StatefulPersistenceContext.AddEntity(System.Object,NHibernate.Engine.Status,System.Object[],NHibernate.Engine.EntityKey,System.Object,NHibernate.LockMode,System.Boolean,NHibernate.Persister.Entity.IEntityPersister,System.Boolean,System.Boolean)"]

Implements

IPersistenceContext..::..AddEntity(Object, Status, array<Object>[]()[][], EntityKey, Object, LockMode, Boolean, IEntityPersister, Boolean, Boolean)

See Also