Persistate API documentation
RefreshAndLock Method

[This is preliminary documentation and is subject to change.]

Gets the current value of this object from persistent storage and sets a database lock.
Declaration Syntax
public DatabaseResultType RefreshAndLock()
Return Value
A DatabaseResultType containing the result of the attempt to lock the object.

This attempts a database lock on this object, even though the current isolation level is below serializable. The object is always enlisted in the current transaction. Note that this will overwrite any modifications which have been made to this object in memory since it was last retrieved or refreshed. It sets its modified state to false.

This will also raise the Modified event. This might at first seem inappropriate, but is required to keep any user interface up to date with the current in-memory value of the object.

Assembly: Persistate (Module: Persistate) Version: (