public ActionResult Index(string displayAll) { bool showAll = (displayAll != null) && Convert.ToBoolean(displayAll); var model = new HomeViewModel(); model.Websites = Helpers.MongoDbService.GetCourtWebsites(showAll).ToList(); model.DisplayAll = showAll; return View(model); }
public ActionResult AddNewSite(HomeViewModel model) { Helpers.MongoDbService.InsertNewCourt(model.CourtName, model.Url, model.CourtKey, model.XPath); return RedirectToAction("Index", "Home"); }