Esempio n. 1
0
        public IActionResult Index()
        {
            var script = _headerScriptService.GetHeaderScripts();

            if (script != null && script.Count > 0)
            {
                return(View(script.FirstOrDefault()));
            }
            else
            {
                return(View());
            }
        }
Esempio n. 2
0
        public IViewComponentResult Invoke()
        {
            var script = _service.GetHeaderScripts();

            if (script != null && script.Count > 0)
            {
                return(View("Default", script.FirstOrDefault(m => m.Active)));
            }
            else
            {
                return(View("Default"));
            }
        }