public async Task <SystemConfigDto> AddAsync(SystemConfigDto input) { using (var dbContext = _dbContextScopeFactory.Create()) { var systemConfig = SystemConfig.Create(input.Code, input.Name, input.Value); _systemConfigRepository.Add(systemConfig); dbContext.SaveChanges(); await GetListAsync(true); return(_mapper.Map <SystemConfigDto>(systemConfig)); } }