Exemple #1
0
        public async Task <WithdrawAccountDto> UpdateAsync(Guid id, WithdrawAccountCreateUpdateDto input)
        {
            var account = await _repository.GetAsync(id);

            account.Update(input.AccountType, input.Account, input.IsDefault, input.Description);

            return(ObjectMapper.Map <WithdrawAccount, WithdrawAccountDto>(account));
        }
Exemple #2
0
        public async Task <WithdrawAccountDto> CreateAsync(WithdrawAccountCreateUpdateDto input)
        {
            var account = new WithdrawAccount(GuidGenerator.Create(), CurrentUser.TenantId, input.AccountType, input.Account, input.IsDefault, input.Description);

            await _repository.InsertAsync(account);

            return(ObjectMapper.Map <WithdrawAccount, WithdrawAccountDto>(account));
        }
Exemple #3
0
 public Task <WithdrawAccountDto> UpdateAsync(Guid id, WithdrawAccountCreateUpdateDto input)
 {
     return(_service.UpdateAsync(id, input));
 }
Exemple #4
0
 public Task <WithdrawAccountDto> CreateAsync(WithdrawAccountCreateUpdateDto input)
 {
     return(_service.CreateAsync(input));
 }