Beispiel #1
0
        public IActionResult AllStudenti()
        {
            IEnumerable <Studente> studenti = repository.GetAllStudenti();

            if (studenti != null)
            {
                return(Ok(studenti.Select(x => new StudenteModels(x))));
            }
            return(BadRequest());
        }
Beispiel #2
0
 public IActionResult Index()
 {
     return(View(repositoryStudenti.GetAllStudenti()));
 }