public async Task CreateOrEdit(CreateOrEditParamSettingDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Create(CreateOrEditParamSettingDto input) { var paramSetting = ObjectMapper.Map <ParamSetting>(input); if (AbpSession.TenantId != null) { paramSetting.TenantId = (int?)AbpSession.TenantId; } await _paramSettingRepository.InsertAsync(paramSetting); }
protected virtual async Task Update(CreateOrEditParamSettingDto input) { var paramSetting = await _paramSettingRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, paramSetting); }