Esempio n. 1
0
        public ActionResult Index(RegisterAccountCommand registerAccountCommand)
        {
            Configuration.Instance.Bus.Handle(new RegisterAccountCommand
            {
                AccountId = Guid.NewGuid(),
                Balance = 100,
                Name = "Sebastian Kent"
            });

            return View(Configuration.Instance.Accounts);
        }
 public void Handle(RegisterAccountCommand registerAccountCommand)
 {
     var account = new Account(registerAccountCommand.AccountId, registerAccountCommand.Name,
                               registerAccountCommand.Balance);
     _repository.Save(account);
 }