Esempio n. 1
0
        public List <string> GetUserTags(int userId)
        {
            User userSkills = _context
                              .Users
                              .Include(s => s.UserSkills)
                              .FirstOrDefault(s => s.Id == userId);

            if (userSkills == null)
            {
                throw RecademyException.UserNotFound(userId);
            }

            return(userSkills
                   .UserSkills
                   .Select(s => s.SkillName)
                   .ToList());
        }
Esempio n. 2
0
 public User Get(int id)
 {
     return(Find(id) ?? throw RecademyException.UserNotFound(id));
 }