Esempio n. 1
0
        public IActionResult Index()
        {
            var sportList = _manager.GetAll();
            var modelList = ServicesAutoMapperConfig.Mapped.Map <List <Models.Sport> >(sportList);

            return(View(modelList));
        }
Esempio n. 2
0
        public async Task <ActionResult <IEnumerable <Sport> > > GetSports()
        {
            var sports = await _manager.GetAll();

            return(Ok(sports));
        }