Ejemplo n.º 1
0
        public OpenProductionUnitsStatsViewModel GetProductionUnitStats()
        {
            var db    = new ApplicationDbContext();
            var stats = PerformanceManager.GetNetworkStatistics(db);

            return(stats);
        }
Ejemplo n.º 2
0
        public ActionResult GetNetworkStats()
        {
            ApplicationDbContext db = new ApplicationDbContext();

            var stats = PerformanceManager.GetNetworkStatistics(db);

            return(Json(new
            {
                ProductionUnitNumber = stats.productionUnitNumber,
                TotalMonthlyProduction = stats.totalMonthlyProduction,
                TotalMonthlySparedCO2 = stats.totalMonthlySparedCO2,
            }, JsonRequestBehavior.AllowGet));
        }