public async Task <IActionResult> Index()
        {
            var skills = await _skillService.GetAllAsync();

            var viewModel = new SkillViewModel
            {
                Skills = skills
            };

            return(View(viewModel));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Get()
        {
            IEnumerable <SkillResponseModel> skills;

            skills = _mapper.Map <IEnumerable <SkillServiceModel>, IEnumerable <SkillResponseModel> >(
                await _skillService.GetAllAsync());

            if (skills == null)
            {
                return(NotFound());
            }

            return(Ok(skills));
        }