protected virtual async Task Create(CreateOrEditMobileWebPageDto input) { var mobileWebPage = ObjectMapper.Map <MobileWebPage>(input); await _mobileWebPageRepository.InsertAsync(mobileWebPage); }
public async Task CreateOrEdit(CreateOrEditMobileWebPageDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Update(CreateOrEditMobileWebPageDto input) { var mobileWebPage = await _mobileWebPageRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, mobileWebPage); }