public async Task <BankingAccountModel> CreateAsync(RequestCreateAccountModel model, CancellationToken cancellationToken = default(CancellationToken)) { var entity = new BankingAccount() { CurrentBalance = 0, CreatedDate = DateTime.UtcNow, UserId = model.UserId }; var account = await accountRepository.CreateAsync(entity, cancellationToken); return(mapper.Map <BankingAccountModel>(account)); }
public Task <BankingAccountModel> Post(RequestCreateAccountModel accountModel, CancellationToken cancellationToken = default(CancellationToken)) { return(_accountService.CreateAsync(accountModel, cancellationToken)); }