Click or drag to resize

IceNetApplicationAccessRepository Method

Marks the begin of a (disposable) repository access scope.

Namespace:  PDTec.IceNet.Sdk
Assembly:  PDTec.IceNet.Sdk (in PDTec.IceNet.Sdk.dll) Version: 7.2.0.0 (7.2.7583.15464)
Syntax
C#
public static IceNetApplicationRepositoryServiceScope AccessRepository()

Return Value

Type: IceNetApplicationRepositoryServiceScope
A (disposable) repository access scope
Examples

The example shows how to use the AccessRepository method.

IceNetApplication.IceNetUserName = "Administrator";

using (IceNetApplication.AccessRepository())
{
    IObject pObject = IceNetApplication.Repository.GetObject("123");

    ReadData(pObject);

    IceNetApplication.TransactionScope.Execute(delegate()
    {
        WriteData(pObject);
    });
}
See Also