public BaseController() { var req = System.Web.HttpContext.Current.Request; var location = string.Empty; if (req.Url.Segments.Length > 1) location = req.Url.Segments[1].Replace("/", ""); var model = new DataProvider().GetSiteData(location); ViewBag.LayoutModel = model; }
public ActionResult Index() { var sites = new DataProvider().GetAllSites().Where(s=>s.SiteName != ""); return View(sites); }