示例#1
0
        public IHttpActionResult GetAll()
        {
            SkillService skillService = CreateSkillService();
            var          skills       = skillService.GetSkills();

            return(Ok(skills));
        }
示例#2
0
        public ActionResult Index()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new SkillService();
            var model   = service.GetSkills();

            return(View(model));
        }
示例#3
0
        // 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));
     }
 }
示例#5
0
        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());
 }