public IHttpActionResult GetClassByTeacherId(int id) { var classes = classRepo.GetClassesByTeacherId(id); if (!classes.Any()) { return(Content(HttpStatusCode.NotFound, "List is empty")); } return(Ok(classes)); }