public async Task CreateOrEdit(CreateOrEditSalesInvoicePaymentDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Update(CreateOrEditSalesInvoicePaymentDto input) { var salesInvoicePayment = await _salesInvoicePaymentRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, salesInvoicePayment); }
protected virtual async Task Create(CreateOrEditSalesInvoicePaymentDto input) { var salesInvoicePayment = ObjectMapper.Map <SalesInvoicePayment>(input); await _salesInvoicePaymentRepository.InsertAsync(salesInvoicePayment); }