public JsonResult SolutionTestCase() { var stopwatch = new Stopwatch(); stopwatch.Start(); var graph = NereidUtilities.BuildNetworkGraph(HttpRequestStorage.DatabaseEntities); // this subgraph is 23 nodes deep var single = graph.Nodes.Single(x => x.ID == "RSB_42"); var subgraph = graph.GetUpstreamSubgraph(single); var allLoadingInputs = HttpRequestStorage.DatabaseEntities.vNereidLoadingInputs.ToList(); var allModelingBMPs = NereidUtilities.ModelingTreatmentBMPs(HttpRequestStorage.DatabaseEntities).ToList(); var allWaterqualityManagementPlanNodes = NereidUtilities.GetWaterQualityManagementPlanNodes(HttpRequestStorage.DatabaseEntities).ToList(); var allModelingQuickBMPs = HttpRequestStorage.DatabaseEntities.QuickBMPs.Include(x => x.TreatmentBMPType) .Where(x => x.PercentOfSiteTreated != null && x.TreatmentBMPType.IsAnalyzedInModelingModule).ToList(); var responseContent = NereidUtilities.SolveSubgraph(subgraph, allLoadingInputs, allModelingBMPs, allWaterqualityManagementPlanNodes, allModelingQuickBMPs, out _, NereidController.HttpClient, true); var stopwatchElapsedMilliseconds = stopwatch.ElapsedMilliseconds; stopwatch.Stop(); return(Json(new { elapsed = stopwatchElapsedMilliseconds, responseContent }, JsonRequestBehavior.AllowGet)); }