protected virtual async Task Create(CreateOrEditTempTransactionDto input) { var tempTransaction = ObjectMapper.Map <TempTransaction>(input); await _tempTransactionRepository.InsertAsync(tempTransaction); }
public async Task CreateOrEdit(CreateOrEditTempTransactionDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Update(CreateOrEditTempTransactionDto input) { var tempTransaction = await _tempTransactionRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, tempTransaction); }