Click or drag to resize

SessionBase.Persist Method (IOptimizedPersistable, Nullable<UInt16>)

This is the recommended way of persisting objects, it is simple and efficient. Each type is stored in its own database unless object class overrides PlacementDatabaseNumber and returns something other than DefaultPlacementDatabaseNumber.

Namespace:  VelocityDb.Session
Assembly:  VelocityDb (in VelocityDb.dll) Version: 11.1.0.0 (11.1)
Syntax
public virtual ulong Persist(
	IOptimizedPersistable ipObj,
	ushort? objectsPerPage = null
)

Parameters

ipObj
Type: VelocityDb.IOptimizedPersistable
The object to make persistent
objectsPerPage (Optional)
Type: System.Nullable<UInt16>
Override of objects per page, only respected when persisting first object of some type

Return Value

Type: UInt64
The Id of the persisted object
See Also