Show / Hide Table of Contents

    Interface ITransaction

    Represent database transaction. Instances of this class are obtained from BeginTransaction() and it is not designed to be directly constructed in your application code.

    Namespace: Kros.KORM.Data
    Assembly: Kros.KORM.dll
    Syntax
    public interface ITransaction : IDisposable

    Properties

    CommandTimeout

    The time in seconds to wait for the System.Data.Common.DbCommand.CommandTimeout in this transaction to execute. If not set, default value (30 s) will be used. Caution: Can be set only for main transaction (nested will share this value).

    Declaration
    int CommandTimeout { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    A value of 0 indicates no limit (an attempt to execute a command will wait indefinitely).

    Methods

    Commit()

    Commits all changes made to the database in the current transaction.

    Declaration
    void Commit()

    Rollback()

    Discards all changes made to the database in the current transaction.

    Declaration
    void Rollback()
    Back to top KROS a.s.