Пример #1
0
        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;
        }
Пример #2
0
 public ActionResult Index()
 {
     var sites = new DataProvider().GetAllSites().Where(s=>s.SiteName != "");
     return View(sites);
 }