Search Results for

    Show / Hide Table of Contents

    Class FluentTransactionBuilder

    Builds and stores all information for a transaction that is represented in fluent-style

    Inheritance
    System.Object
    FluentTransactionBuilder
    Implements
    IFluentTransactionBuilder
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Simplic.Data
    Assembly: Simplic.Data.dll
    Syntax
    public class FluentTransactionBuilder : IFluentTransactionBuilder

    Constructors

    | Improve this Doc View Source

    FluentTransactionBuilder(ITransactionService)

    Initialize transaction builder

    Declaration
    public FluentTransactionBuilder(ITransactionService transactionService)
    Parameters
    Type Name Description
    ITransactionService transactionService

    Transaction service instance

    Properties

    | Improve this Doc View Source

    Tasks

    Gets the actual list of tasks to execute when committing or aborting

    Declaration
    public IList<Func<Task>> Tasks { get; }
    Property Value
    Type Description
    System.Collections.Generic.IList<System.Func<System.Threading.Tasks.Task>>
    | Improve this Doc View Source

    TransactionService

    Gets the transaction service for executing transaction operations on commit and abort

    Declaration
    public ITransactionService TransactionService { get; }
    Property Value
    Type Description
    ITransactionService

    Methods

    | Improve this Doc View Source

    AddService<TModel, TId>(ITransactionRepository<TModel, TId>)

    Adds a service-instance to the current builder

    Declaration
    public void AddService<TModel, TId>(ITransactionRepository<TModel, TId> service)
        where TModel : new()
    Parameters
    Type Name Description
    ITransactionRepository<TModel, TId> service

    Service instance

    Type Parameters
    Name Description
    TModel

    Object type

    TId

    Unique id type

    | Improve this Doc View Source

    GetService<TModel, TId>()

    Gets a service from the builder

    Declaration
    public ITransactionRepository<TModel, TId> GetService<TModel, TId>()
        where TModel : new()
    Returns
    Type Description
    ITransactionRepository<TModel, TId>

    Service instance

    Type Parameters
    Name Description
    TModel

    Object type

    TId

    Unique id type

    | Improve this Doc View Source

    GetTransaction()

    Creates a new transaction if no transaction is existing. Only one instance will be created during builder-lifetime.

    Declaration
    public async Task<ITransaction> GetTransaction()
    Returns
    Type Description
    System.Threading.Tasks.Task<ITransaction>

    Transaction instance

    Implements

    IFluentTransactionBuilder

    Extension Methods

    FluentTransactionExtension.AddService<TService, TModel, TId>(IFluentTransactionBuilder, TService)
    FluentTransactionExtension.Create<TService, TModel, TId>(IFluentTransactionBuilder, Func<ITransactionRepository<TModel, TId>, TModel>)
    FluentTransactionExtension.Update<TService, TModel, TId>(IFluentTransactionBuilder, Func<ITransactionRepository<TModel, TId>, TModel>)
    FluentTransactionExtension.Delete<TService, TModel, TId>(IFluentTransactionBuilder, Func<ITransactionRepository<TModel, TId>, TId>)
    FluentTransactionExtension.CommitAsync(IFluentTransactionBuilder)
    FluentTransactionExtension.AbortAsync(IFluentTransactionBuilder)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx