public JsonResult GetAllStats() { var c_cont = db.CON_Contactenos.Count(); var c_cot = db.COT_Cotizaciones.Count(); var c_prod = db.PRO_Productos.Where(c => c.STS_Id == 1).Count(); var c_news = db.NEW_Noticias.Where(c => c.STS_Id == 1).Count(); var statObject = new Stats(); statObject.Contactos = c_cont; statObject.Cotizaciones = c_cot; statObject.Productos = c_prod; statObject.Noticias = c_news; return Json(statObject.SerializeToJson()); }