Пример #1
0
        public async Task HandleAsync(UserUpdateSettingsCommand command)
        {
            var settings = await _context.UserSettings.FirstOrDefaultAsync(x => x.UserId == command.UserId);

            settings.DarkMode = command.DarkMode;
            settings.Locale   = command.Locale;
            settings.Popups   = command.Popups;
            await _context.SaveChangesAsync();
        }
Пример #2
0
        public async Task <IActionResult> UpdateSettings(UserUpdateSettingsCommand command)
        {
            await _commandBus.ExecuteAsync(command);

            return(Ok());
        }