Exemple #1
0
 public IHttpActionResult AddSkillToProgrammer(string userId, [FromBody] ProgrammerSkillModel programmerSkill)
 {
     try
     {
         _skillService.AddSkillToProgrammer(Mapper.Map <ProgrammerSkillModel, ProgrammerSkillDTO>(programmerSkill));
     }
     catch (ValidationException ex)
     {
         return(BadRequest(ex.Message));
     }
     catch (Exception)
     {
         return(InternalServerError());
     }
     return(Ok(new { Message = "Skill added succesfully!" }));
 }