public async Task <IActionResult> CreateAsync() { var openEvent = EventGenerator.BankAccountOpened(); await _eventStoreRepository.AddEventAsync(openEvent.AccountNumber, openEvent); return(RedirectToAction("Index")); }
public async Task <ActionResult> OpenBankAccount(BankAccountOpenedEvent openEvent) { var response = await _eventStoreRepo.AddEventAsync(openEvent.AccountNumber, openEvent); return(CreatedAtAction("created", response)); }