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); }
public async Task AddAccount([FromBody] AddFinancialAccountDto dto) { await _financialService.AddAccountAsync(dto); }