private async Task Create(CreateOrEditQuotationUnitPriceDto input) { var quotationUnitPrice = ObjectMapper.Map <QuotationUnitPrice>(input); await _quotationUnitPriceRepository.InsertAsync(quotationUnitPrice); }
public async Task CreateOrEdit(CreateOrEditQuotationUnitPriceDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
private async Task Update(CreateOrEditQuotationUnitPriceDto input) { var quotationUnitPrice = await _quotationUnitPriceRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, quotationUnitPrice); }