예제 #1
0
        public async Task AddAccountAsync(AddFinancialAccountDto account)
        {
            await _notifications.PushSuccessAsync("Account added successfully.");

            account.Id                 = account.Id.GenerateIfEmpty();
            account.Number             = Regex.Replace(account.Number, @"\s+", "");
            account.CreatedDateTimeUtc = DateTime.UtcNow;

            await _eventStore.Publish <FinancialAccountAddedEvent>(account);
        }
예제 #2
0
 public async Task AddAccount([FromBody] AddFinancialAccountDto dto)
 {
     await _financialService.AddAccountAsync(dto);
 }