Get chart file a bit quicker from DB

This commit is contained in:
2016-05-13 12:31:40 -04:00
parent 48e7578de7
commit 568211251b
3 changed files with 28 additions and 15 deletions
+3 -11
View File
@@ -21,11 +21,7 @@ namespace LeafWeb.Web.Controllers
{
public ActionResult Index(int leafInputId)
{
var leafOutputFile =
DataService
.GetLeafInput(leafInputId)?
.OutputFiles?
.FirstOrDefault(f => f.IsLeafChartFile);
var leafOutputFile = DataService.GetLeafOutput_ChartFile(leafInputId);
if (leafOutputFile == null)
throw new ArgumentOutOfRangeException(); // TODO: break
@@ -53,13 +49,9 @@ namespace LeafWeb.Web.Controllers
public ActionResult ChartCurve(int leafInputId, string curveId)
{
var leafOutputFile =
DataService
.GetLeafInput(leafInputId)?
.OutputFiles?
.FirstOrDefault(f => f.IsLeafChartFile);
var leafOutputFile = DataService.GetLeafOutput_ChartFile(leafInputId);
if (leafOutputFile == null)
if (leafOutputFile == null)
throw new ArgumentOutOfRangeException(); // TODO: break
var curveData = GetCurveData(leafOutputFile.Contents, curveId);