Either Save(String, Object) or Update(String, Object) the given instance, depending upon resolution of the unsaved-value checks (see the manual for discussion of unsaved-value checking).

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

Syntax

C#
void SaveOrUpdate(
	string entityName,
	Object obj
)
Visual Basic
Sub SaveOrUpdate ( _
	entityName As String, _
	obj As Object _
)
Visual C++
void SaveOrUpdate(
	String^ entityName, 
	Object^ obj
)

Parameters

entityName
Type: System..::..String
The name of the entity
obj
Type: System..::..Object
a transient or detached instance containing new or updated state

Remarks

This operation cascades to associated instances if the association is mapped with cascade="save-update".

See Also