public IHttpActionResult GetLessonById(int id) { Lesson lesson = service.GetLessonById(id); if (lesson == null) { return(NotFound()); } return(Ok(lesson)); }