/// <summary> /// Initializes a new instance of the <see cref="EntityFrameworkCommandHandler{TContext, TCommand}" /> class. /// </summary> /// <param name="mediator"> /// A processing intermediary that is used to process sub-commands. /// </param> /// <param name="repositoryFactory"> /// The factory that produces data access repositories for the handler. /// </param> /// <param name="isolationLevel"> /// The isolation level for the transaction, or <see cref="IsolationLevel.Unspecified" /> to use the database default. The /// default value is <see cref="IsolationLevel.Unspecified" />. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="mediator" /> is <see langword="null" /> -or- <paramref name="repositoryFactory" /> is /// <see langword="null" />. /// </exception> protected EntityFrameworkCommandHandler(ICommandMediator mediator, EntityFrameworkRepositoryFactory <TContext> repositoryFactory, IsolationLevel isolationLevel) : this(mediator, repositoryFactory, new EntityFrameworkTransaction <TContext>(repositoryFactory.Context, isolationLevel)) { return; }
/// <summary> /// Initializes a new instance of the <see cref="EntityFrameworkCommandHandler{TContext, TCommand}" /> class. /// </summary> /// <param name="mediator"> /// A processing intermediary that is used to process sub-commands. /// </param> /// <param name="repositoryFactory"> /// The factory that produces data access repositories for the handler. /// </param> /// <param name="transaction"> /// A transaction that is used to process the command. /// </param> /// <exception cref="ArgumentException"> /// <paramref name="transaction" /> is in an invalid state. /// </exception> /// <exception cref="ArgumentNullException"> /// <paramref name="mediator" /> is <see langword="null" /> -or- <paramref name="repositoryFactory" /> is /// <see langword="null" /> -or- <paramref name="transaction" /> is <see langword="null" />. /// </exception> protected EntityFrameworkCommandHandler(ICommandMediator mediator, EntityFrameworkRepositoryFactory <TContext> repositoryFactory, EntityFrameworkTransaction <TContext> transaction) : base(mediator, repositoryFactory, transaction) { return; }
/// <summary> /// Initializes a new instance of the <see cref="EntityFrameworkCommandHandler{TContext, TCommand}" /> class. /// </summary> /// <param name="mediator"> /// A processing intermediary that is used to process sub-commands. /// </param> /// <param name="repositoryFactory"> /// The factory that produces data access repositories for the handler. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="mediator" /> is <see langword="null" /> -or- <paramref name="repositoryFactory" /> is /// <see langword="null" />. /// </exception> protected EntityFrameworkCommandHandler(ICommandMediator mediator, EntityFrameworkRepositoryFactory <TContext> repositoryFactory) : this(mediator, repositoryFactory, DefaultIsolationLevel) { return; }