public IActionResult AllStudenti() { IEnumerable <Studente> studenti = repository.GetAllStudenti(); if (studenti != null) { return(Ok(studenti.Select(x => new StudenteModels(x)))); } return(BadRequest()); }
public IActionResult Index() { return(View(repositoryStudenti.GetAllStudenti())); }