public ActionResult Analytics() { AnalyticsVM model = new AnalyticsVM(); model._budgetAverage_vm.LstBudgetAverages = AnalyticsDAL.GetBudgetAverages(); model._musicalsCount_vm.LstMusicalCounts = AnalyticsDAL.GetMusicalCounts(); model._repeatStaffPositions_vm.LstPossiblePositions = AnalyticsDAL.GetPossiblePositions(); model._membersByVoicePart_vm.LstAllVoiceParts = AnalyticsDAL.GetPossibleVoiceParts(); model._nonSinging_vm.LstNonSingingMembers = AnalyticsDAL.GetNonSingingMembers(); model._allActorsNotIn_vm.LstAllShows = ShowsDAL.GetAllShows(); return(View(model)); }
/// <summary> /// Returns Analytics/Default.csthml or nothing if neither GA nor AppIns is available. /// </summary> /// <returns></returns> /// <remarks> /// Should I output this VC only when env is Production? /// </remarks> public async Task <IViewComponentResult> InvokeAsync() { var coreSettings = await _settingSvc.GetSettingsAsync <CoreSettings>(); var vm = new AnalyticsVM { GoogleAnalyticsTrackingID = coreSettings.GoogleAnalyticsTrackingID, AppInsightsFullScript = _jsSnippet.FullScript, }; // if neither is available, show nothing if (vm.AppInsightsFullScript.IsNullOrEmpty() && vm.GoogleAnalyticsTrackingID.IsNullOrEmpty()) { return(Content(string.Empty)); } return(View("Analytics.cshtml", vm)); }