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

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

Syntax

C#
void SaveOrUpdate(
	Object obj
)
Visual Basic
Sub SaveOrUpdate ( _
	obj As Object _
)
Visual C++
void SaveOrUpdate(
	Object^ 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