public ActionResult Firststartup() { try { Settings settings = settingsManager.GetSettingsItem(); if (settings != null) { TempData[VolMongoConstants.NUMBER_OF_ITEMS_PER_PAGE] = settings.Quantity; TempData[VolMongoConstants.CONNECTION_LANGUAGE] = settings.Lang; return(RedirectToAction("Index", "Home")); } else { settings = new Settings { Lang = "en", Quantity = 15 }; settingsManager.AddSettingsToDB(settings); TempData[VolMongoConstants.NUMBER_OF_ITEMS_PER_PAGE] = settings.Quantity; TempData[VolMongoConstants.CONNECTION_LANGUAGE] = settings.Lang; return(RedirectToAction("Index", "Home")); } } catch { return(RedirectToAction("Localserver", "Home")); } }