public async Task <IActionResult> ApplyConfig(int id) { var config = _context.GameServerConfigurations .Include(s => s.GameServer).ThenInclude(s => s.SyncFiles) .Include(s => s.GameServer).ThenInclude(s => s.HostServer) .Include(s => s.Files) .FirstOrDefault(g => g.GameServerConfigurationID == id); if (config == null) { return(NotFound()); } await _service.ApplyAllConfiguration(config); return(RedirectToAction(nameof(Details), new { id = config.GameServerID })); }