IdentifiedCommandHandler could be issue of behaviours (pipeline)
A reference .NET application implementing an eCommerce site
Brought to you by:
jobily
Originally created by: dengere
IdentifiedCommandHandler called with behaviours and implementation call other command. Pipelines will run again. Specialy TransactionBehaviour could be effect. Am i wrong?
// Send the embedded business command to mediator so it runs its related CommandHandler
var result = await _mediator.Send(command, cancellationToken); //Behaviours will encapsulate second time.
Originally posted by: dengere
TransactionBehavior modified by lines of code for multiple command side effect.
//I thought it is not good idea.
if (_dbContext.HasActiveTransaction) // because has acctive transaction by IdentifiedCommand
{
return await next();
}