public async Task HandleAsync(ICommandContext context, AddTransactionPreparationCommand command) { var account = await context.GetAsync <BankAccount>(command.AggregateRootId); account.AddTransactionPreparation(command.TransactionId, command.TransactionType, command.PreparationType, command.Amount); }
public void Handle(ICommandContext context, AddTransactionPreparationCommand command) { context.Get <BankAccount>(command.AggregateRootId).AddTransactionPreparation(command.TransactionId, command.TransactionType, command.PreparationType, command.Amount); }