Exemple #1
0
 public ActionResult <InternshipDetailsRatingViewModel> GetInternshipById(int id)
 {
     try
     {
         var internship = _internshipService.GetInternshipDetails(id);
         var ratingDTO  = _internshipService.GetInternshipRatingsAverege(id);
         var internshipDetailsRating = InternshipDetailsRatingMapper.ToInternshipDetailsRating(internship, ratingDTO);
         return(Ok(internshipDetailsRating));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }