Either Save() or Update() the given instance, depending upon the value of its identifier property.

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

Syntax

Visual Basic (Declaration)
Sub SaveOrUpdate ( _
	obj As Object _
)
C#
void SaveOrUpdate(
	Object obj
)
Visual C++
void SaveOrUpdate(
	Object^ obj
)
JavaScript
function saveOrUpdate(obj);

Parameters

obj
Type: System..::.Object
A transient instance containing new or updated state

Remarks

By default the instance is always saved. This behaviour may be adjusted by specifying an unsaved-value attribute of the identifier property mapping

See Also