Show / Hide Table of Contents

    Class Transaction

    Provides a scope to safely read and write to a Realm. Must use explicitly via BeginWrite().

    Inheritance
    Object
    Transaction
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace:Realms
    Assembly:Realm.dll
    Syntax
    public class Transaction : IDisposable
    Remarks

    All access to a Realm occurs within a Transaction. Read transactions are created implicitly.

    Methods

    | Improve this Doc View Source

    Commit()

    Use to save the changes to the realm. If Transaction is declared in a using block, must be used before the end of that block.

    Declaration
    public void Commit()
    | Improve this Doc View Source

    Dispose()

    Will automatically Rollback() the transaction on existing scope, if not explicitly Committed.

    Declaration
    public void Dispose()
    Implements
    IDisposable.Dispose()
    | Improve this Doc View Source

    Rollback()

    Use explicitly to undo the changes in a Transaction, otherwise it is automatically invoked by exiting the block.

    Declaration
    public void Rollback()
    • Improve this Doc
    • View Source
    Back to top Copyright © 2017 Realm
    Generated by DocFX