public IHttpActionResult GetAll() { SkillService skillService = CreateSkillService(); var skills = skillService.GetSkills(); return(Ok(skills)); }
public ActionResult Index() { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new SkillService(); var model = service.GetSkills(); return(View(model)); }
// GET: api/Skills public GenericResponse <List <SkillModel> > GetSkills() { var result = new GenericResponse <List <SkillModel> >(); var skills = service.GetSkills(); //TODO: CREATE RESPONSE OBJECT WITH STATUS CODE AND MESSAGE result.Data = skills; return(result); }
public IHttpActionResult GetSkills() { try { return(Ok(_skillService.GetSkills())); } catch (Exception ex) { return(InternalServerError(ex)); } }
private ICollection <SkillViewModel> GetSkills() { var skillService = new SkillService(); return(skillService.GetSkills() .ToList()); // var questionsDifficulty = questionService.GetQuestionsInSkillWithDifficulty(skill, 0).ToList(); //var session = new TrainingSessionViewModel() //{ // Skill = skill.Name, // Questions = questions //}; //this.DataContext = session; }
public async Task <IEnumerable <Skill> > GetSkill() { return(await _skillService.GetSkills()); }