fix bug when register forum account
tangxuehua opened this issue · comments
xuehua commented
public void Handle(ICommandContext context, RegisterNewAccountCommand command)
{
_lockService.ExecuteInLock(typeof(Account).Name, () =>
{
_registerAccountService.RegisterAccount(command.AggregateRootId, command.Name);
context.Add(new Account(command.AggregateRootId, command.Name, command.Password));
});
}`
xuehua commented
public void Handle(ICommandContext context, RegisterNewAccountCommand command) { _lockService.ExecuteInLock(typeof(Account).Name, () => { var account = new Account(command.AggregateRootId, command.Name, command.Password); _registerAccountService.RegisterAccount(command.AggregateRootId, command.Name); context.Add(account); }); }