public ActionResult Unlock(Guid AccountId) { var command = new UnlockAccountCommand(AccountId); Configuration.Instance().Bus.Handle(command); return RedirectToAction("Unlocked"); }
public void Handle(UnlockAccountCommand command) { var account = _repository.GetById<Account>(command.AccountId); account.UnlockAccount(); _repository.Save(account); }