コード例 #1
0
        public async Task <IActionResult> CreateAsync()
        {
            var openEvent = EventGenerator.BankAccountOpened();
            await _eventStoreRepository.AddEventAsync(openEvent.AccountNumber, openEvent);

            return(RedirectToAction("Index"));
        }
コード例 #2
0
        public async Task <ActionResult> OpenBankAccount(BankAccountOpenedEvent openEvent)
        {
            var response = await _eventStoreRepo.AddEventAsync(openEvent.AccountNumber, openEvent);

            return(CreatedAtAction("created", response));
        }