public IActionResult Index() { var script = _headerScriptService.GetHeaderScripts(); if (script != null && script.Count > 0) { return(View(script.FirstOrDefault())); } else { return(View()); } }
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")); } }