public OpenProductionUnitsStatsViewModel GetProductionUnitStats() { var db = new ApplicationDbContext(); var stats = PerformanceManager.GetNetworkStatistic(db); return(stats); }
public ActionResult GetNetworkStats() { ApplicationDbContext db = new ApplicationDbContext(); var stats = PerformanceManager.GetNetworkStatistic(db); return(Json(new { ProductionUnitNumber = stats.productionUnitNumber, TotalMonthlyProduction = stats.totalMonthlyProduction, TotalMonthlySparedCO2 = stats.totalMonthlySparedCO2, }, JsonRequestBehavior.AllowGet)); }