Click or drag to resize

IContentStoreOpenReadSession Method


Opens a read-only session. This session doesn't track changes to objects that were retrieved within this session, nor does it track created or deleted objects. It is not in charge of saving changes, only for reading.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.3.169
Syntax
IUserSession OpenReadSession(
	IReadonlyUser user = null
)

Parameters

user (Optional)
Type: Ingeniux.CMSIReadonlyUser
The user to open the session.

Return Value

Type: IUserSession
The read-only session.
Remarks
This session throws an error upon disposal, when any of the objects loaded within it changes, or when trying to add or remove objects.
Examples
C#
IReadonlyUser currentUser = store.GetStartingUser(@"yourfirm\youruserid");
using (IUserSession session = store.OpenReadSession(currentUser))
{
        ......
}
See Also