public void Handle(Commands.Create command) { var account = _uow.R <Account>().New(command.AccountId); var currency = _uow.R <Currency.Currency>().Get(command.CurrencyId); account.Create(command.Code, command.Name, command.AcceptPayments, command.AllowReconcile, command.Operation, currency); }
public async Task Handle(Commands.Create command, IMessageHandlerContext ctx) { var account = await _uow.For <Account>().New(command.AccountId); var currency = await _uow.For <Currency.Currency>().Get(command.CurrencyId); account.Create(command.Code, command.Name, command.AcceptPayments, command.AllowReconcile, command.Operation, currency); }
public async Task Handle(Commands.Create command, IHandleContext ctx) { var account = await _uow.For <Account>().New(command.AccountId); var currency = await _uow.For <Currency.Currency>().Get(command.CurrencyId); var store = await _uow.For <Relations.Store.Store>().Get(command.StoreId); account.Create(command.Code, command.Name, command.AcceptPayments, command.AllowReconcile, command.Operation, currency, store); }