Search Results for

    Show / Hide Table of Contents

    Class TransactionGuard

    Definition

    Namespace:
    Tizen.Data.Tdbc
    Assembly:
    Tizen.Data.Tdbc.dll

    This class helps the operation of the statement in a transacted way.

    public class TransactionGuard : IDisposable
    Inheritance
    object
    TransactionGuard
    Implements
    IDisposable
    Remarks

    To finish the transaction, either call Commit() to apply database operations or Dispose() to rollback the transaction.

    Examples

    Usage:

    using (var transaction = new TransationGuard(statement)) {
    ...
    transaction.Commit();
    }

    Constructors

    View Source

    TransactionGuard(IStatement, bool)

    The constructor of TransactionGuard class.

    Declaration
    public TransactionGuard(IStatement statement, bool isEnabled = true)
    Parameters
    Type Name Description
    IStatement statement
    bool isEnabled

    Properties

    View Source

    IsEnabled

    The flag representing whether the TransactionGuard is enabled.

    Declaration
    public bool IsEnabled { get; set; }
    Property Value
    Type Description
    bool

    Methods

    View Source

    Commit()

    Commit the transaction.

    Declaration
    public void Commit()
    View Source

    Dispose()

    Dispose the object. Rollback the transaction.

    Declaration
    public void Dispose()

    Implements

    IDisposable
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX