public HttpResponseMessage GetTeacherInfo(int teacherId) { try { teacherContent response = _business.GetTeacherInfo(teacherId); return(Request.CreateResponse(HttpStatusCode.OK, response)); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message.ToString())); } }
public teacherContent GetTeacherInfo(int teacherId) { try { teacherContent teacherInfo = _repository.GetTeacherInfo(teacherId); return(teacherInfo); } catch (Exception) { throw; } }