Esempio n. 1
0
        public IActionResult GetAll()
        {
            var hobbies   = _hobbyService.GetAll();
            var hobbyDtos = _mapper.Map <IList <HobbyDto> >(hobbies);

            return(Ok(hobbyDtos));
        }
Esempio n. 2
0
 // GET: Hobby
 public ActionResult Index()
 {
     return(View(
                _hobbyService.GetAll()
                ));
 }