private async Task Create(CreateOrEditPriceValidityDto input) { var priceValidity = ObjectMapper.Map <PriceValidity>(input); await _priceValidityRepository.InsertAsync(priceValidity); }
public async Task CreateOrEdit(CreateOrEditPriceValidityDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
private async Task Update(CreateOrEditPriceValidityDto input) { var priceValidity = await _priceValidityRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, priceValidity); }