public async Task <IActionResult> Procentaje(int?type, string materie) { double r = -1; if (type == 1 && !string.IsNullOrEmpty(materie)) { r = await _repo.getPassPercentageAsync(materie); } if (type == 2) { ViewBag.StudentiAn = await _repo.getRestantieriPercentageAsync(); } if (type == 3) { ViewBag.StudentProm = await _repo.getMaxPrezentariAsync(); } return(View(r)); }