public IHttpActionResult GetTrainingPlansByCoach(int id) { List <trainingPlan> trainingPlansFinded; try { trainingPlansFinded = trainingPlanService.trainingPlansByCoachId(id); } catch (Exception e) { return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, e.ToString()))); } return(Ok(trainingPlansFinded)); }