public IHttpActionResult GetByProfileId(string userId) { IEnumerable <EducationModel> education; try { education = Mapper.Map <IEnumerable <EducationDTO>, IEnumerable <EducationModel> >(_educationService.GetEducationByProfileId(userId)); } catch (ValidationException) { return(NotFound()); } catch (Exception) { return(InternalServerError()); } return(Ok(education)); }