Пример #1
0
 public static EnhancedLoggingSettings FromModel(EnhancedLoggingConfigModel model)
 {
     return(new EnhancedLoggingSettings()
     {
         DaysToKeepLogs = model.DaysToKeepLogs
     });
 }
Пример #2
0
        public async Task <IActionResult> Configure(EnhancedLoggingConfigModel model)
        {
            if (!ModelState.IsValid)
            {
                return(Configure());
            }

            await _settingService.SaveSettingAsync(
                EnhancedLoggingSettings.FromModel(model));

            _notificationService.SuccessNotification(
                await _localizationService.GetResourceAsync("Admin.Plugins.Saved")
                );

            return(Configure());
        }