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

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